Commit 32ae9b89 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Carlos Maiolino
Browse files

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: 080d01c4 ("xfs: implement zoned garbage collection")
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarCarlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: default avatarHans Holmberg <hans.holmberg@wdc.com>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarCarlos Maiolino <cem@kernel.org>
parent 2d263deb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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));
	}