btrfs: Remove redundant FLAG_VACANCY
Commit 9036c10208
("Btrfs: update hole handling v2") added the
FLAG_VACANCY to denote holes, however there was already a consistent way
of flagging extents which represent hole - ->block_start =
EXTENT_MAP_HOLE. And also the only place where this flag is checked is
in the fiemap code, but the block_start value is also checked and every
other place in the filesystem detects holes by using block_start
value's. So remove the extra flag. This survived a full xfstest run.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:

committed by
David Sterba

parent
3f2dd7a0ce
commit
4a2d25cd93
@@ -288,10 +288,6 @@ static noinline int test_btrfs_get_extent(u32 sectorsize, u32 nodesize)
|
||||
test_msg("Expected a hole, got %llu\n", em->block_start);
|
||||
goto out;
|
||||
}
|
||||
if (!test_bit(EXTENT_FLAG_VACANCY, &em->flags)) {
|
||||
test_msg("Vacancy flag wasn't set properly\n");
|
||||
goto out;
|
||||
}
|
||||
free_extent_map(em);
|
||||
btrfs_drop_extent_cache(BTRFS_I(inode), 0, (u64)-1, 0);
|
||||
|
||||
@@ -1130,7 +1126,6 @@ int btrfs_test_inodes(u32 sectorsize, u32 nodesize)
|
||||
int ret;
|
||||
|
||||
set_bit(EXTENT_FLAG_COMPRESSED, &compressed_only);
|
||||
set_bit(EXTENT_FLAG_VACANCY, &vacancy_only);
|
||||
set_bit(EXTENT_FLAG_PREALLOC, &prealloc_only);
|
||||
|
||||
test_msg("Running btrfs_get_extent tests\n");
|
||||
|
Reference in New Issue
Block a user