]> 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)
commitc0b3c3bbc6c76015252b9ff9759330747d4071da
tree85366750c4c006811c40b8da410a62fbac90fbdc
parent2d19b9c80e78414eb407d4d75164ba9e2e7bb641
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