xfs: don't mark all discard issued by zoned GC as sync

Discard are not usually sync when issued from zoned garbage collection,
so drop the REQ_SYNC flag.

Fixes: 080d01c41d ("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>
This commit is contained in:
Christoph Hellwig
2026-01-30 06:19:22 +01:00
committed by Carlos Maiolino
parent 2d263debd7
commit 32ae9b893a

View 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));
}