diff options
author | John Garry <john.g.garry@oracle.com> | 2024-08-15 16:32:27 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-08-19 09:48:59 -0600 |
commit | 64b582ca88ca11400467b282d5fa3b870ded1c11 (patch) | |
tree | 9d329dc2c221b349433e93285d15720f7077d271 /drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c | |
parent | b313a8c835516bdda85025500be866ac8a74e022 (diff) |
block: Read max write zeroes once for __blkdev_issue_write_zeroes()
As reported in [0], we may get a hang when formatting a XFS FS on a RAID0
drive.
Commit 73a768d5f955 ("block: factor out a blk_write_zeroes_limit helper")
changed __blkdev_issue_write_zeroes() to read the max write zeroes
value in the loop. This is not safe as max write zeroes may change in
value. Specifically for the case of [0], the value goes to 0, and we get
an infinite loop.
Lift the limit reading out of the loop.
[0] https://lore.kernel.org/linux-xfs/4d31268f-310b-4220-88a2-e191c3932a82@oracle.com/T/#t
Fixes: 73a768d5f955 ("block: factor out a blk_write_zeroes_limit helper")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20240815163228.216051-2-john.g.garry@oracle.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c')
0 files changed, 0 insertions, 0 deletions