All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: Raphael Norwitz <rnorwitz@nvidia.com>,
	Sergei Heifetz <heifetz@yandex-team.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>,
	Stefano Garzarella <sgarzare@redhat.com>
Subject: Re: [PATCH] vhost-user-blk: add seg-max-adjust flag
Date: Sat, 4 Jul 2026 05:57:45 -0400	[thread overview]
Message-ID: <20260704055717-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <573d11f7-71e1-4f31-bbfb-884778961e14@yandex-team.ru>

On Sat, Jul 04, 2026 at 12:17:40PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> On 15.04.26 18:24, Raphael Norwitz wrote:
> > > diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
> > > index c151e836770..23f910d9fe3 100644
> > > --- a/hw/block/vhost-user-blk.c
> > > +++ b/hw/block/vhost-user-blk.c
> > > @@ -65,6 +65,11 @@ static void vhost_user_blk_update_config(VirtIODevice *vdev, uint8_t *config)
> > >       /* Our num_queues overrides the device backend */
> > >       virtio_stw_p(vdev, &s->blkcfg.num_queues, s->num_queues);
> > > 
> > > +    if (s->seg_max_adjust) {
> > 
> > NIT: declaration at the top of the function
> 
> Hmm, no, accordingly to docs/dev/style.rst, "at the beginning of blocks",
> so, it's OK to declare it at top of if-block, it's often used in the code,
> look at output of `git grep -B 3 '^        int '` for example.

indeed.

> > 
> > > +        uint32_t seg_max = MIN(s->blkcfg.seg_max, s->queue_size - 2);

if you respon pls add an empty line here.

> > > +        virtio_stl_p(vdev, &s->blkcfg.seg_max, seg_max);
> > > +    }
> 
> 
> -- 
> Best regards,
> Vladimir



      reply	other threads:[~2026-07-04  9:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-01 23:05 [PATCH] vhost-user-blk: add seg-max-adjust flag Sergei Heifetz
2026-04-15 15:24 ` Raphael Norwitz
2026-06-15 17:19   ` Vladimir Sementsov-Ogievskiy
2026-07-04  9:17   ` Vladimir Sementsov-Ogievskiy
2026-07-04  9:57     ` Michael S. Tsirkin [this message]

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=20260704055717-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=heifetz@yandex-team.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rnorwitz@nvidia.com \
    --cc=sgarzare@redhat.com \
    --cc=vsementsov@yandex-team.ru \
    /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.