aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/block-group.h
diff options
context:
space:
mode:
authorNaohiro Aota <naohiro.aota@wdc.com>2021-08-19 21:19:08 +0900
committerDavid Sterba <dsterba@suse.com>2021-10-26 19:07:58 +0200
commit8eae532be75317ec59ff6fd68994b986d017502d (patch)
treee6a06c9475013655c05964b658b9316c07865601 /fs/btrfs/block-group.h
parentbtrfs: defrag: enable defrag for subpage case (diff)
downloadlinux-dev-8eae532be75317ec59ff6fd68994b986d017502d.tar.xz
linux-dev-8eae532be75317ec59ff6fd68994b986d017502d.zip
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>
Diffstat (limited to 'fs/btrfs/block-group.h')
-rw-r--r--fs/btrfs/block-group.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/block-group.h b/fs/btrfs/block-group.h
index c72a71efcb18..2db40a005512 100644
--- a/fs/btrfs/block-group.h
+++ b/fs/btrfs/block-group.h
@@ -202,6 +202,7 @@ struct btrfs_block_group {
*/
u64 alloc_offset;
u64 zone_unusable;
+ u64 zone_capacity;
u64 meta_write_pointer;
};