summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.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/extent-tree.c
parent68b38550ddbea13d296184bf69edff387618b1d3 (diff)
downloadtalos-op-linux-f25784b35f590c81d5fb8245a8cd45e1afb6f1b2.tar.gz
talos-op-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/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 08188f1615d9..fadf69a2764b 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -288,8 +288,10 @@ again:
while (1) {
smp_mb();
- if (block_group->fs_info->closing)
+ if (block_group->fs_info->closing > 1) {
+ last = (u64)-1;
break;
+ }
leaf = path->nodes[0];
slot = path->slots[0];
OpenPOWER on IntegriCloud