]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
xfs: improve the comments in xfs_select_zone_nowait
authorChristoph Hellwig <hch@lst.de>
Wed, 16 Jul 2025 12:54:07 +0000 (14:54 +0200)
committerCarlos Maiolino <cem@kernel.org>
Thu, 24 Jul 2025 15:30:14 +0000 (17:30 +0200)
The top of the function comment is outdated, and the parts still correct
duplicate information in comment inside the function.  Remove the top of
the function comment and instead improve a comment inside the function.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_zone_alloc.c

index 6a123d3dd62d48666d694d7e5e88984cbffc0448..33f7eee521a82a5995483c4f0789564442de10ad 100644 (file)
@@ -654,13 +654,6 @@ static inline bool xfs_zoned_pack_tight(struct xfs_inode *ip)
                !(ip->i_diflags & XFS_DIFLAG_APPEND);
 }
 
-/*
- * Pick a new zone for writes.
- *
- * If we aren't using up our budget of open zones just open a new one from the
- * freelist.  Else try to find one that matches the expected data lifetime.  If
- * we don't find one that is good pick any zone that is available.
- */
 static struct xfs_open_zone *
 xfs_select_zone_nowait(
        struct xfs_mount        *mp,
@@ -688,7 +681,8 @@ xfs_select_zone_nowait(
                goto out_unlock;
 
        /*
-        * See if we can open a new zone and use that.
+        * See if we can open a new zone and use that so that data for different
+        * files is mixed as little as possible.
         */
        oz = xfs_try_open_zone(mp, write_hint);
        if (oz)