qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: "fam@euphon.net" <fam@euphon.net>,
	"qemu-block@nongnu.org" <qemu-block@nongnu.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	"mreitz@redhat.com" <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] block/io: refactor padding
Date: Fri, 31 May 2019 15:58:40 +0000	[thread overview]
Message-ID: <57dbb68c-653c-063a-15aa-33e15af42c7a@virtuozzo.com> (raw)
In-Reply-To: <20190531154930.GF9842@localhost.localdomain>

31.05.2019 18:49, Kevin Wolf wrote:
> Am 31.05.2019 um 16:10 hat Vladimir Sementsov-Ogievskiy geschrieben:
>> 31.05.2019 13:51, Stefan Hajnoczi wrote:
>>> On Tue, May 28, 2019 at 11:45:44AM +0300, Vladimir Sementsov-Ogievskiy wrote:
>>>> We have similar padding code in bdrv_co_pwritev,
>>>> bdrv_co_do_pwrite_zeroes and bdrv_co_preadv. Let's combine and unify
>>>> it.
>>>>
>>>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>>>> ---
>>>>    block/io.c | 344 ++++++++++++++++++++++++++++-------------------------
>>>
>>> Hmmm...this adds more lines than it removes.  O_o
>>
>> It's near to be the same size, and keep in mind big comment.
> 
> If you take the whole series into account, it looks even less
> favourable, despite some comments:
> 
> 3 files changed, 273 insertions(+), 165 deletions(-)
> 
>>>
>>> Merging a change like this can still be useful but there's a risk of
>>> making the code harder to understand due to the additional layers of
>>> abstraction.
>>
>> It's a preparation for adding qiov_offset parameter to read/write path. Seems
>> correct to unify similar things, which I'm going to change. And I really want
>> to make code more understandable than it was.. But my view is not general
>> of course.
> 
> Depending on the changes you're going to make (e.g. adding more users of
> the same functionality, or making the duplicated code much larger), this
> can be a good justification even if the code size increases.
> 
> I'd suggest to add the explanation (like 'This is in preparation for
> ...') to the commit message then.
> 
> Kevin
> 

I think, I'll resend the whole series with this preparation next week.

-- 
Best regards,
Vladimir

      reply	other threads:[~2019-05-31 16:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28  8:45 [Qemu-devel] [PATCH 0/2] block/io: refactor padding Vladimir Sementsov-Ogievskiy
2019-05-28  8:45 ` [Qemu-devel] [PATCH 1/2] util/iov: introduce qemu_iovec_init_extended Vladimir Sementsov-Ogievskiy
2019-05-31  8:33   ` Stefan Hajnoczi
2019-05-28  8:45 ` [Qemu-devel] [PATCH 2/2] block/io: refactor padding Vladimir Sementsov-Ogievskiy
2019-05-31 10:51   ` Stefan Hajnoczi
2019-05-31 14:10     ` Vladimir Sementsov-Ogievskiy
2019-05-31 15:49       ` Kevin Wolf
2019-05-31 15:58         ` Vladimir Sementsov-Ogievskiy [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=57dbb68c-653c-063a-15aa-33e15af42c7a@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=fam@euphon.net \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --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 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).