]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: zoned: introduce a minimal zone size 4M and reject mount
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Fri, 13 May 2022 15:52:52 +0000 (08:52 -0700)
committerDavid Sterba <dsterba@suse.com>
Tue, 17 May 2022 18:15:25 +0000 (20:15 +0200)
commitea86ded88a4a59c444580cb4edfe3b0e26ce00fc
treed469287ad5246c01ac9311a5e458d58a5d4485af
parente4f275e3a4f3889406048afc24dbcdab8287d550
btrfs: zoned: introduce a minimal zone size 4M and reject mount

Zoned devices are expected to have zone sizes in the range of 1-2GB for
ZNS SSDs and SMR HDDs have zone sizes of 256MB, so there is no need to
allow arbitrarily small zone sizes on btrfs.

But for testing purposes with emulated devices it is sometimes desirable
to create devices with as small as 4MB zone size to uncover errors.

So use 4MB as the smallest possible zone size and reject mounts of devices
with a smaller zone size.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zoned.c