pktcdvd: don't set max_hw_sectors on the underlying device
authorChristoph Hellwig <hch@lst.de>
Thu, 29 Feb 2024 14:44:08 +0000 (06:44 -0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 1 Mar 2024 16:08:00 +0000 (09:08 -0700)
commiteabf5dfc2d6048d8415cd22d38d7d3e0bdb4dff9
treeb071d6a45b1ab5951e15652693965257175b1a3b
parent8e0ef412869430d114158fc3b9b1fb111e247bd3
pktcdvd: don't set max_hw_sectors on the underlying device

pktcdvd sets max_hw_sectors on the queue of the underlying device that
it doesn't own (and doesn't reset it ever) since the driver was merged.
This can create all kinds of problems as the underlying driver doesn't
even know about it changing the limit.

As the state purpose is to not create I/Os larger than a single frame,
and pktcdvd never builds bios larger than that, just set REQ_NOMERGE
on the bios it submits so that largers I/Os never get built.

Note: I don't have packet writing hardware, so this is compile tested
only.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240229144408.1047967-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/pktcdvd.c