btrfs: zoned: skip ZONE FINISH of conventional zones
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Wed, 23 Jul 2025 13:38:10 +0000 (15:38 +0200)
committerDavid Sterba <dsterba@suse.com>
Wed, 13 Aug 2025 10:28:42 +0000 (12:28 +0200)
commitf0ba0e7172a222ea6043b61ecd86723c46d7bcf2
tree23792eae668a30cd5a1cc6c6e5b9cc179f78cfa6
parent7b632596188e1973c6b3ac1c9f8252f735e1039f
btrfs: zoned: skip ZONE FINISH of conventional zones

Don't call ZONE FINISH for conventional zones as this will result in I/O
errors. Instead check if the zone that needs finishing is a conventional
zone and if yes skip it.

Also factor out the actual handling of finishing a single zone into a
helper function, as do_zone_finish() is growing ever bigger and the
indentations levels are getting higher.

Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zoned.c