Linux block layer
 help / color / mirror / Atom feed
* [PATCH 0/2] block: Fix __blkdev_issue_write_zeroes() limit handling
@ 2024-08-15  8:27 John Garry
  2024-08-15  8:27 ` [PATCH 1/2] block: Read max write zeroes once for __blkdev_issue_write_zeroes() John Garry
  2024-08-15  8:27 ` [PATCH 2/2] block: Drop NULL check in bdev_write_zeroes_sectors() John Garry
  0 siblings, 2 replies; 9+ messages in thread
From: John Garry @ 2024-08-15  8:27 UTC (permalink / raw)
  To: axboe, hch; +Cc: martin.petersen, linux-block, kbusch, John Garry

As reported in [0], we may get an infinite loop in
__blkdev_issue_write_zeroes() for making an XFS FS on a raid0 config.

Fix __blkdev_issue_write_zeroes() limit handling by reading the write
zeroes limit outside the loop.

Also include a change to drop the unnecessary NULL queue check in
bdev_write_zeroes_sectors().

[0] https://lore.kernel.org/linux-block/20240815062112.GA14067@lst.de/T/#m14ed5d882f9390a46cfe2fcfa2b51218aafbd32e

John Garry (2):
  block: Read max write zeroes once for __blkdev_issue_write_zeroes()
  block: Drop NULL check in bdev_write_zeroes_sectors()

 block/blk-lib.c        | 22 +++++++++++++++-------
 include/linux/blkdev.h |  7 +------
 2 files changed, 16 insertions(+), 13 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-08-15 15:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-15  8:27 [PATCH 0/2] block: Fix __blkdev_issue_write_zeroes() limit handling John Garry
2024-08-15  8:27 ` [PATCH 1/2] block: Read max write zeroes once for __blkdev_issue_write_zeroes() John Garry
2024-08-15 12:40   ` Christoph Hellwig
2024-08-15 13:29     ` John Garry
2024-08-15 15:26       ` Christoph Hellwig
2024-08-15 15:38         ` John Garry
2024-08-15 15:41         ` Martin K. Petersen
2024-08-15  8:27 ` [PATCH 2/2] block: Drop NULL check in bdev_write_zeroes_sectors() John Garry
2024-08-15 12:40   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox