]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: quit early if the fs has no RAID56 support for raid56 related checks
authorQu Wenruo <wqu@suse.com>
Sun, 22 May 2022 11:47:47 +0000 (13:47 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Jul 2022 15:44:33 +0000 (17:44 +0200)
commitc7ab14fe51a278a28a6f852a1241bc3afaf68a74
tree6e5180be891b6e24ab24431365c29df749548a24
parenta5671218885f4a53fd838ffef28b1cce1129ef3d
btrfs: quit early if the fs has no RAID56 support for raid56 related checks

The following functions do special handling for RAID56 chunks:

- btrfs_is_parity_mirror()
  Check if the range is in RAID56 chunks.

- btrfs_full_stripe_len()
  Either return sectorsize for non-RAID56 profiles or full stripe length
  for RAID56 chunks.

But if a filesystem without any RAID56 chunks, it will not have RAID56
incompat flags, and we can skip the chunk tree looking up completely.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c