Skip to content

Commit 32ae9b8

Browse files
Christoph Hellwigcmaiolino
authored andcommitted
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: 080d01c ("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>
1 parent 2d263de commit 32ae9b8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

fs/xfs/xfs_zone_gc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,8 @@ xfs_zone_gc_prepare_reset(
905905
if (!bdev_zone_is_seq(bio->bi_bdev, bio->bi_iter.bi_sector)) {
906906
if (!bdev_max_discard_sectors(bio->bi_bdev))
907907
return false;
908-
bio->bi_opf = REQ_OP_DISCARD | REQ_SYNC;
908+
bio->bi_opf &= ~REQ_OP_ZONE_RESET;
909+
bio->bi_opf |= REQ_OP_DISCARD;
909910
bio->bi_iter.bi_size =
910911
XFS_FSB_TO_B(rtg_mount(rtg), rtg_blocks(rtg));
911912
}

0 commit comments

Comments
 (0)