All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Xie Yongji <xieyongji@bytedance.com>
Cc: axboe@kernel.dk, hch@lst.de, josef@toxicpanda.com,
	jasowang@redhat.com, stefanha@redhat.com, kwolf@redhat.com,
	linux-block@vger.kernel.org, nbd@other.debian.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH v2 0/4] Add blk_validate_block_size() helper for drivers to validate block size
Date: Mon, 25 Oct 2021 13:01:50 -0400	[thread overview]
Message-ID: <20211025130130-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20211025142506.167-1-xieyongji@bytedance.com>

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


WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Xie Yongji <xieyongji@bytedance.com>
Cc: axboe@kernel.dk, josef@toxicpanda.com, nbd@other.debian.org,
	linux-block@vger.kernel.org, stefanha@redhat.com,
	virtualization@lists.linux-foundation.org, hch@lst.de
Subject: Re: [PATCH v2 0/4] Add blk_validate_block_size() helper for drivers to validate block size
Date: Mon, 25 Oct 2021 13:01:50 -0400	[thread overview]
Message-ID: <20211025130130-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20211025142506.167-1-xieyongji@bytedance.com>

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

  parent reply	other threads:[~2021-10-25 17:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 14:25 [PATCH v2 0/4] Add blk_validate_block_size() helper for drivers to validate block size Xie Yongji
2021-10-25 14:25 ` [PATCH v2 1/4] block: Add a helper to validate the " Xie Yongji
2021-10-25 14:25 ` [PATCH v2 2/4] nbd: Use blk_validate_block_size() to validate " Xie Yongji
2021-10-25 14:25 ` [PATCH v2 3/4] loop: " Xie Yongji
2021-10-25 14:25 ` [PATCH v2 4/4] virtio-blk: " Xie Yongji
2021-10-25 17:08   ` Michael S. Tsirkin
2021-10-25 17:08     ` Michael S. Tsirkin
2021-10-26 14:32     ` Yongji Xie
2021-10-25 17:01 ` Michael S. Tsirkin [this message]
2021-10-25 17:01   ` [PATCH v2 0/4] Add blk_validate_block_size() helper for drivers " Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211025130130-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=jasowang@redhat.com \
    --cc=josef@toxicpanda.com \
    --cc=kwolf@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=nbd@other.debian.org \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xieyongji@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.