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>
This commit is contained in:
parent
b241a46c7c
commit
25b93eefe2
|
@ -4554,7 +4554,7 @@ static int add_extent_rec_nolookup(struct cache_tree *extent_cache,
|
||||||
|
|
||||||
if (tmpl->metadata)
|
if (tmpl->metadata)
|
||||||
rec->crossing_stripes = check_crossing_stripes(rec->start,
|
rec->crossing_stripes = check_crossing_stripes(rec->start,
|
||||||
rec->max_size);
|
global_info->tree_root->nodesize);
|
||||||
check_extent_type(rec);
|
check_extent_type(rec);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -4655,7 +4655,7 @@ static int add_extent_rec(struct cache_tree *extent_cache,
|
||||||
*/
|
*/
|
||||||
if (tmpl->metadata)
|
if (tmpl->metadata)
|
||||||
rec->crossing_stripes = check_crossing_stripes(
|
rec->crossing_stripes = check_crossing_stripes(
|
||||||
rec->start, rec->max_size);
|
rec->start, global_info->tree_root->nodesize);
|
||||||
check_extent_type(rec);
|
check_extent_type(rec);
|
||||||
maybe_free_extent_rec(extent_cache, rec);
|
maybe_free_extent_rec(extent_cache, rec);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue