All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yongji Xie <xieyongji@bytedance.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	 Stefano Garzarella <sgarzare@redhat.com>,
	Kevin Wolf <kwolf@redhat.com>,
	mreitz@redhat.com,  mlureau@redhat.com, jsnow@redhat.com,
	Eric Blake <eblake@redhat.com>,
	 Coiby.Xu@gmail.com, hreitz@redhat.com, qemu-block@nongnu.org,
	 qemu-devel@nongnu.org
Subject: Re: [PATCH v5 2/8] block-backend: Introduce blk_get_guest_block_size()
Date: Thu, 19 May 2022 16:03:22 +0800	[thread overview]
Message-ID: <CACycT3skLBKJnWhCQVKyHrqX8-RkTSG_jsFP9Mrgpc4ZTRde1A@mail.gmail.com> (raw)
In-Reply-To: <YoTxwwS97POt79PQ@stefanha-x1.localdomain>

On Wed, May 18, 2022 at 9:17 PM Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> On Wed, May 04, 2022 at 03:40:45PM +0800, Xie Yongji wrote:
> > Support getting the guest block size for the block backend.
> > It's needed for the following commit.
> >
> > Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
> > ---
> >  block/block-backend.c             | 6 ++++++
> >  include/sysemu/block-backend-io.h | 1 +
> >  2 files changed, 7 insertions(+)
> >
> > diff --git a/block/block-backend.c b/block/block-backend.c
> > index 35457a6a1d..1582ff81c9 100644
> > --- a/block/block-backend.c
> > +++ b/block/block-backend.c
> > @@ -2106,6 +2106,12 @@ void blk_set_guest_block_size(BlockBackend *blk, int align)
> >      blk->guest_block_size = align;
> >  }
> >
> > +int blk_get_guest_block_size(BlockBackend *blk)
> > +{
> > +    IO_CODE();
> > +    return blk->guest_block_size;
>
> I have sent a patch to remove blk->guest_block_size because this field
> is currently unused.
>

OK.

> I think there is a cleaner way for this patch series to store the guest
> logical_block_size (see next patch). Stashing it in BlockBackend was
> attractive because virtio-blk-handler.c lacks a struct to store its
> parameters (writable, serial, logical_block_size), but if such a struct
> is introduced then there's no need to stash it in BlockBackend.
>

Looks good to me.

Thanks,
Yongji


  reply	other threads:[~2022-05-19  8:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04  7:40 [PATCH v5 0/8] Support exporting BDSs via VDUSE Xie Yongji
2022-05-04  7:40 ` [PATCH v5 1/8] block: Support passing NULL ops to blk_set_dev_ops() Xie Yongji
2022-05-18 13:22   ` Stefan Hajnoczi
2022-05-04  7:40 ` [PATCH v5 2/8] block-backend: Introduce blk_get_guest_block_size() Xie Yongji
2022-05-18 13:16   ` Stefan Hajnoczi
2022-05-19  8:03     ` Yongji Xie [this message]
2022-05-04  7:40 ` [PATCH v5 3/8] block/export: Abstract out the logic of virtio-blk I/O process Xie Yongji
2022-05-18 13:13   ` Stefan Hajnoczi
2022-05-19  8:09     ` Yongji Xie
2022-05-04  7:40 ` [PATCH v5 4/8] linux-headers: Add vduse.h Xie Yongji
2022-05-18 13:22   ` Stefan Hajnoczi
2022-05-04  7:40 ` [PATCH v5 5/8] libvduse: Add VDUSE (vDPA Device in Userspace) library Xie Yongji
2022-05-18 13:46   ` Stefan Hajnoczi
2022-05-19  8:11     ` Yongji Xie
2022-05-04  7:40 ` [PATCH v5 6/8] vduse-blk: Implement vduse-blk export Xie Yongji
2022-05-18 13:50   ` Stefan Hajnoczi
2022-05-04  7:40 ` [PATCH v5 7/8] vduse-blk: Add vduse-blk resize support Xie Yongji
2022-05-18 13:51   ` Stefan Hajnoczi
2022-05-04  7:40 ` [PATCH v5 8/8] libvduse: Add support for reconnecting Xie Yongji
2022-05-18 14:03   ` Stefan Hajnoczi
2022-05-19  8:25     ` Yongji Xie
2022-05-19  9:44       ` Stefan Hajnoczi
2022-05-19 10:02         ` Yongji Xie
2022-05-19 11:28           ` Stefan Hajnoczi
2022-05-13 10:03 ` [PATCH v5 0/8] Support exporting BDSs via VDUSE Michael S. Tsirkin
2022-05-17 13:02   ` Yongji Xie

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=CACycT3skLBKJnWhCQVKyHrqX8-RkTSG_jsFP9Mrgpc4ZTRde1A@mail.gmail.com \
    --to=xieyongji@bytedance.com \
    --cc=Coiby.Xu@gmail.com \
    --cc=eblake@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mlureau@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.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.