Thread (1 message) 1 message, 1 author, 2021-10-25

Re: [PATCH v2 0/4] Add blk_validate_block_size() helper for drivers to validate block size

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2021-10-25 17:08:39
Also in: linux-block

On Mon, Oct 25, 2021 at 10:25:02PM +0800, Xie Yongji wrote:
The block layer can't support the block size larger than
page size yet, so driver needs to validate the block size
before setting it. Now this validation is done in device drivers
with some duplicated codes. This series tries to add a block
layer helper for it and makes loop driver, nbd driver and
virtio-blk driver use it.

V1 to V2:
- Return and print error if validation fails in virtio-blk driver
Please document how all this was tested.
Xie Yongji (4):
  block: Add a helper to validate the block size
  nbd: Use blk_validate_block_size() to validate block size
  loop: Use blk_validate_block_size() to validate block size
  virtio-blk: Use blk_validate_block_size() to validate block size

 drivers/block/loop.c       | 17 ++---------------
 drivers/block/nbd.c        |  3 ++-
 drivers/block/virtio_blk.c | 11 +++++++++--
 include/linux/blkdev.h     |  8 ++++++++
 4 files changed, 21 insertions(+), 18 deletions(-)

-- 
2.11.0
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help