aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorYan Zheng <zheng.yan@oracle.com>2009-07-28 08:41:57 -0400
committerChris Mason <chris.mason@oracle.com>2009-07-28 08:41:57 -0400
commitf25784b35f590c81d5fb8245a8cd45e1afb6f1b2 (patch)
tree71306747041b6e4a5eaccc5028c770fed29b3f87 /fs/btrfs/disk-io.c
parent68b38550ddbea13d296184bf69edff387618b1d3 (diff)
downloadkernel_samsung_crespo-f25784b35f590c81d5fb8245a8cd45e1afb6f1b2.zip
kernel_samsung_crespo-f25784b35f590c81d5fb8245a8cd45e1afb6f1b2.tar.gz
kernel_samsung_crespo-f25784b35f590c81d5fb8245a8cd45e1afb6f1b2.tar.bz2
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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index c658397..3a9b887 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);