]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
xfs: don't mark all discard issued by zoned GC as sync
authorChristoph Hellwig <hch@lst.de>
Fri, 30 Jan 2026 05:19:22 +0000 (06:19 +0100)
committerCarlos Maiolino <cem@kernel.org>
Fri, 30 Jan 2026 09:41:42 +0000 (10:41 +0100)
Discard are not usually sync when issued from zoned garbage collection,
so drop the REQ_SYNC flag.

Fixes: 080d01c41d44 ("xfs: implement zoned garbage collection")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_zone_gc.c

index 7bdc5043cc1a79161511b18fa8395140ef3ec5b4..60964c926f9f9a10b659e1730f89239655c73fb0 100644 (file)
@@ -905,7 +905,8 @@ xfs_zone_gc_prepare_reset(
        if (!bdev_zone_is_seq(bio->bi_bdev, bio->bi_iter.bi_sector)) {
                if (!bdev_max_discard_sectors(bio->bi_bdev))
                        return false;
-               bio->bi_opf = REQ_OP_DISCARD | REQ_SYNC;
+               bio->bi_opf &= ~REQ_OP_ZONE_RESET;
+               bio->bi_opf |= REQ_OP_DISCARD;
                bio->bi_iter.bi_size =
                        XFS_FSB_TO_B(rtg_mount(rtg), rtg_blocks(rtg));
        }