linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Add blk_validate_block_size() helper for drivers to validate block size
@ 2021-10-25  9:43 Xie Yongji
  2021-10-25  9:43 ` [PATCH 1/4] block: Add a helper to validate the " Xie Yongji
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Xie Yongji @ 2021-10-25  9:43 UTC (permalink / raw)
  To: axboe, hch, josef, mst, jasowang, stefanha, kwolf
  Cc: linux-block, nbd, virtualization

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.

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 |  7 +++++--
 include/linux/blkdev.h     |  8 ++++++++
 4 files changed, 17 insertions(+), 18 deletions(-)

-- 
2.11.0


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

end of thread, other threads:[~2021-10-26 14:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25  9:43 [PATCH 0/4] Add blk_validate_block_size() helper for drivers to validate block size Xie Yongji
2021-10-25  9:43 ` [PATCH 1/4] block: Add a helper to validate the " Xie Yongji
2021-10-25  9:43 ` [PATCH 2/4] nbd: Use blk_validate_block_size() to validate " Xie Yongji
2021-10-25  9:43 ` [PATCH 3/4] loop: " Xie Yongji
2021-10-25  9:43 ` [PATCH 4/4] virtio-blk: " Xie Yongji
2021-10-25 13:19   ` Michael S. Tsirkin
2021-10-25 13:47     ` Yongji Xie
2021-10-25 17:21       ` Michael S. Tsirkin
2021-10-26 14:37         ` Yongji Xie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).