diff options
author | Yan Zheng <zheng.yan@oracle.com> | 2009-07-28 14:41:57 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-07-28 14:41:57 +0200 |
commit | f25784b35f590c81d5fb8245a8cd45e1afb6f1b2 (patch) | |
tree | 71306747041b6e4a5eaccc5028c770fed29b3f87 /fs/btrfs/disk-io.c | |
parent | Btrfs: change how we unpin extents (diff) | |
download | linux-f25784b35f590c81d5fb8245a8cd45e1afb6f1b2.tar.xz linux-f25784b35f590c81d5fb8245a8cd45e1afb6f1b2.zip |
Btrfs: Fix async caching interaction with unmount
- don't stop the caching thread until btrfs_commit_super return.
- if caching is interrupted by umount, set last to (u64)-1.
otherwise the un-scanned range of block group will be considered
as free extent.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index c658397c7473..3a9b88759880 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2317,6 +2317,9 @@ int close_ctree(struct btrfs_root *root) printk(KERN_ERR "btrfs: commit super ret %d\n", ret); } + fs_info->closing = 2; + smp_mb(); + if (fs_info->delalloc_bytes) { printk(KERN_INFO "btrfs: at unmount delalloc count %llu\n", (unsigned long long)fs_info->delalloc_bytes); |