summaryrefslogtreecommitdiff
path: root/cmds-check.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-04-04 13:15:46 +0200
committerDavid Sterba <dsterba@suse.com>2016-05-11 15:50:31 +0200
commit25b93eefe29cdfb1d799498dfc69f122ac3e247e (patch)
tree4e037a1f949603d7dadb6c6826ad6b199b0510d9 /cmds-check.c
parentb241a46c7c434bdd202e132a430a4c8a8e99a618 (diff)
btrfs-progs: check: check stripe crossing against nodesize
The extent record's max_size might be 0 and the stripe crossing check will report a false positive, should use the filesyste nodesize. There's a global fs_info available. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-check.c')
-rw-r--r--cmds-check.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds-check.c b/cmds-check.c
index 85f475b7..de17be35 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -4554,7 +4554,7 @@ static int add_extent_rec_nolookup(struct cache_tree *extent_cache,
if (tmpl->metadata)
rec->crossing_stripes = check_crossing_stripes(rec->start,
- rec->max_size);
+ global_info->tree_root->nodesize);
check_extent_type(rec);
return ret;
}
@@ -4655,7 +4655,7 @@ static int add_extent_rec(struct cache_tree *extent_cache,
*/
if (tmpl->metadata)
rec->crossing_stripes = check_crossing_stripes(
- rec->start, rec->max_size);
+ rec->start, global_info->tree_root->nodesize);
check_extent_type(rec);
maybe_free_extent_rec(extent_cache, rec);
return ret;