diff options
author | Josef Bacik <jbacik@fb.com> | 2015-02-09 10:02:25 -0500 |
---|---|---|
committer | Josef Bacik <jbacik@fb.com> | 2015-02-09 14:53:15 -0500 |
commit | 08a45972234b3edb1348641e188f233bab6e50c1 (patch) | |
tree | 1fe22dd486f7f558f720e86a6bf0ea2644c208b7 /extent-tree.c | |
parent | bce7dbba2859a47554c122eae32ead87e6a6510a (diff) | |
download | btrfs-progs-08a45972234b3edb1348641e188f233bab6e50c1.tar.gz |
Btrfs-progs: remove global transaction from fsck
We hold a transaction open for the entirety of fixing extent refs. This works
out ok most of the time but we can be tight on space and run out of space when
fixing things. To get around this just push down the transaction starting dance
into the functions that actually fix things. This keeps us from ending up with
ENOSPC because we pinned everything and allows the code to be a bit simpler.
Thanks,
Signed-off-by: Josef Bacik <jbacik@fb.com>
Diffstat (limited to 'extent-tree.c')
-rw-r--r-- | extent-tree.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/extent-tree.c b/extent-tree.c index d42c572..e8545ef 100644 --- a/extent-tree.c +++ b/extent-tree.c @@ -2566,6 +2566,13 @@ check_failed: goto new_group; } + if (info->excluded_extents && + test_range_bit(info->excluded_extents, ins->objectid, + ins->objectid + num_bytes -1, EXTENT_DIRTY, 0)) { + search_start = ins->objectid + num_bytes; + goto new_group; + } + if (exclude_nr > 0 && (ins->objectid + num_bytes > exclude_start && ins->objectid < exclude_start + exclude_nr)) { search_start = exclude_start + exclude_nr; |