Validate logical block size in blk_validate_limits()
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest5 patches 6 repliesApplied
- v15 patches 11 repliesSuperseded
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | virtio_blk: Fix default logical block size fallbackdrivers/ | +13 | 0 replies | |
| 2/5 | block: Validate logical block size in blk_validate_limits()block/ include/ | +5 | 1 reply | |
| 3/5 | null_blk: Don't bother validating blocksizedrivers/ | +0 | 2 replies | |
| 4/5 | virtio_blk: Don't bother validating blocksizedrivers/ | +1 | 1 reply | |
| 5/5 | loop: Don't bother validating blocksizedrivers/ | +1 | 1 reply |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Christoph Hellwig | Michael S. Tsirkin | Stefan Hajnoczi | Zhu Yanjun | Damien Le Moal |
|---|---|---|---|---|---|
| 1/5 | R-b | A-b | R-b | ||
| 2/5 | R-b | ||||
| 3/5 | R-b | R-b | R-b | ||
| 4/5 | R-b | A-b | R-b | R-b | |
| 5/5 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.
Cover letter [PATCH v2 0/5] Validate logical block size in blk_validate_limits()
This series adds validation of the logical block size in blk_validate_limits().
Some drivers had already been validating this themselves. As such, we can mostly drop that driver validation.
nbd is problematic, as we cannot only change to just stop calling blk_validate_limits(). This is because the LBS is updated in a 2-stage process:
a. update block size in the driver and validate
b. update queue limits
So if we stop validating the limits in a., there is a user-visible change in behaviour (as we stop rejecting invalid limits from the NBD_SET_BLKSIZE ioctl). So I left that untouched.
This topic was originally mentioned in [0] and then again in [1] by Keith.
I have also included a related virtio_blk change to deal with blk_size config fallback.
[0] https://lore.kernel.org/linux-block/[email protected]/
[1] https://lore.kernel.org/linux-block/[email protected]/
Differences to v1:
- Add RB tags (thanks!)
- Update comment on blk_validate_block_size() and add print in blk_validate_limits()
John Garry (5):
virtio_blk: Fix default logical block size fallback
block: Validate logical block size in blk_validate_limits()
null_blk: Don't bother validating blocksize
virtio_blk: Don't bother validating blocksize
loop: Don't bother validating blocksize
block/blk-settings.c | 4 ++++ drivers/block/loop.c | 12 +----------- drivers/block/null_blk/main.c | 3 --- drivers/block/virtio_blk.c | 31 +++++++++++-------------------- include/linux/blkdev.h | 1 + 5 files changed, 17 insertions(+), 34 deletions(-)
Signature · 1 line
2.31.1