[PATCH v2 0/2] block: Fix __blkdev_issue_write_zeroes() limit handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx/T/#m14ed5d882f9390a46cfe2fcfa2b51218aafbd32e

Differences to v1:
- Add RB tags from Christoph (thanks!)
- Update comment on __blkdev_issue_write_zeroes (Martin, Christoph)

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        | 25 ++++++++++++++++++-------
 include/linux/blkdev.h |  7 +------
 2 files changed, 19 insertions(+), 13 deletions(-)

-- 
2.31.1





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux