]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: zoned: document RECLAIM_ZONES flush state
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Fri, 22 May 2026 09:02:43 +0000 (11:02 +0200)
committerFilipe Manana <fdmanana@suse.com>
Tue, 9 Jun 2026 10:49:26 +0000 (11:49 +0100)
Document the purpose of the RECLAIM_ZONES flush state.

Reviewed-by: Boris Burkov <boris@bur.io>
Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/space-info.c

index f0436eea15445b978fa6098041fae450fbc6c184..739984462677e6c6609d1fcde1b52a4a8f5f3023 100644 (file)
@@ -1411,6 +1411,13 @@ static void btrfs_preempt_reclaim_metadata_space(struct work_struct *work)
  *   This is where we reclaim all of the pinned space generated by running the
  *   iputs
  *
+ * RECLAIM_ZONES
+ *   This state only works for the zoned mode. We scan the block groups in the
+ *   reclaim_bgs_list and check if we can relocate them. If yes perform the
+ *   relocation to garbage collect the zone. On each of these runs
+ *   BTRFS_ZONED_SYNC_RECLAIM_BATCH (5) block-groups will be reclaimed, after all
+ *   unused block-groups have been deleted.
+ *
  * RESET_ZONES
  *   This state works only for the zoned mode. We scan the unused block group
  *   list and reset the zones and reuse the block group.