]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: zoned: load zone capacity information from devices
authorNaohiro Aota <naohiro.aota@wdc.com>
Thu, 19 Aug 2021 12:19:08 +0000 (21:19 +0900)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Oct 2021 17:07:58 +0000 (19:07 +0200)
commit92d8865eda75d89da1c36f1f2bdbf2e372722d15
treee6a06c9475013655c05964b658b9316c07865601
parent69f22fcd62fca8c59b399997ab791727e23480b6
btrfs: zoned: load zone capacity information from devices

The ZNS specification introduces the concept of a Zone Capacity.  A zone
capacity is an additional per-zone attribute that indicates the number of
usable logical blocks within each zone, starting from the first logical
block of each zone. It is always smaller or equal to the zone size.

With the SINGLE profile, we can set a block group's "capacity" as the same
as the underlying zone's Zone Capacity. We will limit the allocation not
to exceed in a following commit.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.h
fs/btrfs/zoned.c