]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: zoned: load active zone information from devices
authorNaohiro Aota <naohiro.aota@wdc.com>
Thu, 19 Aug 2021 12:19:15 +0000 (21:19 +0900)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Oct 2021 17:07:59 +0000 (19:07 +0200)
commitea6f8ddcde638123a010f8a43f68e5856b1788cc
tree89f485b739205124753a4408cb88a3a81440b32c
parent8376d9e1ed8f4a83d0889081893e872fe2dbc755
btrfs: zoned: load active zone information from devices

The ZNS specification defines a limit on the number of zones that can be in
the implicit open, explicit open or closed conditions. Any zone with such
condition is defined as an active zone and correspond to any zone that is
being written or that has been only partially written. If the maximum
number of active zones is reached, we must either reset or finish some
active zones before being able to chose other zones for storing data.

Load queue_max_active_zones() and track the number of active zones left on
the device.

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zoned.c
fs/btrfs/zoned.h