diff options
| author | John Garry <[email protected]> | 2024-08-15 16:32:27 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2024-08-19 15:48:59 +0000 |
| commit | 64b582ca88ca11400467b282d5fa3b870ded1c11 (patch) | |
| tree | 9d329dc2c221b349433e93285d15720f7077d271 /lib/debugobjects.c | |
| parent | block: Fix lockdep warning in blk_mq_mark_tag_wait (diff) | |
| download | kernel-64b582ca88ca11400467b282d5fa3b870ded1c11.tar.gz kernel-64b582ca88ca11400467b282d5fa3b870ded1c11.zip | |
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/[email protected]/T/#t
Fixes: 73a768d5f955 ("block: factor out a blk_write_zeroes_limit helper")
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Martin K. Petersen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions
