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