]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: zoned: finish superblock zone once no space left for new SB
authorNaohiro Aota <naohiro.aota@wdc.com>
Thu, 19 Aug 2021 12:19:14 +0000 (21:19 +0900)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Oct 2021 17:07:59 +0000 (19:07 +0200)
commit288ef02656c7cf40dda9905bc273c5988d633f3b
tree85366750c4c006811c40b8da410a62fbac90fbdc
parentc6274f5d0e3966394574fbf34e3db6b07e439624
btrfs: zoned: finish superblock zone once no space left for new SB

If there is no more space left for a new superblock in a superblock zone,
then it is better to ZONE_FINISH the zone and frees up the active zone
count.

Since btrfs_advance_sb_log() can now issue REQ_OP_ZONE_FINISH, we also need
to convert it to return int for the error case.

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