All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-devel@nongnu.org
Cc: kwolf@redhat.com, qemu-block@nongnu.org,
	Markus Armbruster <armbru@redhat.com>,
	mreitz@redhat.com, nsoffer@redhat.com,
	John Snow <jsnow@redhat.com>
Subject: Re: [PATCH v4 5/9] blockdev: Split off basic bitmap operations for qemu-img
Date: Thu, 14 May 2020 09:15:59 -0500	[thread overview]
Message-ID: <1afffb4d-5bd6-7674-bc6d-d3482ec78920@redhat.com> (raw)
In-Reply-To: <59288d06-6da0-0479-bfd9-7beaf8d3f35c@virtuozzo.com>

On 5/14/20 1:21 AM, Vladimir Sementsov-Ogievskiy wrote:
> 13.05.2020 04:16, Eric Blake wrote:
>> Upcoming patches want to add some basic bitmap manipulation abilities
>> to qemu-img.  But blockdev.o is too heavyweight to link into qemu-img
>> (among other things, it would drag in block jobs and transaction
>> support - qemu-img does offline manipulation, where atomicity is less
>> important because there are no concurrent modifications to compete
>> with), so it's time to split off the bare bones of what we will need
>> into a new file block/monitor/bitmap-qmp-cmds.o.
>>
>> This is sufficient to expose 6 QMP commands for use by qemu-img (add,
>> remove, clear, enable, disable, merge), as well as move the three
>> helper functions touched in the previous patch.  Regarding
>> MAINTAINERS, the new file is automatically part of block core, but
>> also makes sense as related to other dirty bitmap files.
>>
>> Signed-off-by: Eric Blake <eblake@redhat.com>
>> Reviewed-by: Max Reitz <mreitz@redhat.com>
>> ---

>> +++ b/block/monitor/bitmap-qmp-cmds.c
> 
> Hmm, shouldn't transaction bitmap actions be moved here too? May be, not 
> in these series..

No, the very reason that we split this file off of blockdev.c is that 
transactions are NOT needed in qemu-img.  You have to have separate .o 
files for what qemu-img needs, vs. what the rest of qemu proper needs, 
and transactions are only needed in qemu proper at the moment.  If we 
ever need transactions in Kevin's qemu-storage-daemon but not all of 
blockdev.c, then we'd need yet another .c file independent from either 
blockdev.c or this patch's new bitmap-qmp-cmds.c.

> 
>> @@ -0,0 +1,323 @@
>> +/*
>> + * QEMU host block device bitmaps
> 
> A bit conflicts with tha fact that they are not of block-device level 
> but of node-level.
> 
> May be just "Block dirty bitmap qmp commands" ?

Copy-and-paste from blockdev.c, tweaked by adding one word.  Your 
wording is also fine.

> 
>> + *
>> + * Copyright (c) 2003-2008 Fabrice Bellard
> 
> Does it really apply here? block-dirty-bitmap-add was added in 2015.. 
> May be Red Hat and Virtuozzo copyrights would be more appropriate.

When splitting a file, the safest course of action is to preserve ALL 
copyright from the original file into the new file.

Adding additional copyright lines is okay as part of submitting new 
functionality, but in this case, I don't feel comfortable adding Red Hat 
copyright (my split isn't adding new functionality), and I don't have 
authorization to add Virtuozzo copyright (as that is not my employer).


>> +#include "qemu/osdep.h"
>> +
>> +#include "sysemu/blockdev.h"
>> +#include "block/block.h"
>> +#include "block/block_int.h"
>> +#include "qapi/qapi-commands-block.h"
>> +#include "qapi/error.h"
> 
> compiles for with only four:
> 
>    #include "qemu/osdep.h"
>    #include "block/block_int.h"
>    #include "qapi/qapi-commands-block.h"
>    #include "qapi/error.h"

Thanks. I blame rebase; an earlier version used a different header in 
patch 4/9; when I moved things to block_int.h in that patch, I didn't 
realize that this patch could be improved.

> 
> with at least extra includes dropped:
> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2020-05-14 14:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13  1:16 [PATCH v4 0/9] qemu-img: Add convert --bitmaps Eric Blake
2020-05-13  1:16 ` [PATCH v4 1/9] docs: Sort sections on qemu-img subcommand parameters Eric Blake
2020-05-14  5:02   ` Vladimir Sementsov-Ogievskiy
2020-05-13  1:16 ` [PATCH v4 2/9] qemu-img: Fix stale comments on doc location Eric Blake
2020-05-14  5:06   ` Vladimir Sementsov-Ogievskiy
2020-05-13  1:16 ` [PATCH v4 3/9] block: Make it easier to learn which BDS support bitmaps Eric Blake
2020-05-14  5:19   ` Vladimir Sementsov-Ogievskiy
2020-05-14 14:09     ` Eric Blake
2020-05-13  1:16 ` [PATCH v4 4/9] blockdev: Promote several bitmap functions to non-static Eric Blake
2020-05-14  5:45   ` Vladimir Sementsov-Ogievskiy
2020-05-14 11:45   ` Vladimir Sementsov-Ogievskiy
2020-05-14 14:10     ` Eric Blake
2020-05-13  1:16 ` [PATCH v4 5/9] blockdev: Split off basic bitmap operations for qemu-img Eric Blake
2020-05-14  6:21   ` Vladimir Sementsov-Ogievskiy
2020-05-14 14:15     ` Eric Blake [this message]
2020-05-13  1:16 ` [PATCH v4 6/9] qemu-img: Add bitmap sub-command Eric Blake
2020-05-14  6:45   ` Vladimir Sementsov-Ogievskiy
2020-05-14 14:20     ` Eric Blake
2020-05-14 15:09       ` Vladimir Sementsov-Ogievskiy
2020-05-18 11:42   ` Vladimir Sementsov-Ogievskiy
2020-05-18 19:07     ` Eric Blake
2020-05-18 19:38       ` Vladimir Sementsov-Ogievskiy
2020-05-13  1:16 ` [PATCH v4 7/9] qcow2: Expose bitmaps' size during measure Eric Blake
2020-05-18 13:07   ` Vladimir Sementsov-Ogievskiy
2020-05-18 19:17     ` Eric Blake
2020-05-18 19:47       ` Vladimir Sementsov-Ogievskiy
2020-05-13  1:16 ` [PATCH v4 8/9] qemu-img: Add convert --bitmaps option Eric Blake
2020-05-18 13:33   ` Vladimir Sementsov-Ogievskiy
2020-05-13  1:16 ` [PATCH v4 9/9] iotests: Add test 291 to for qemu-img bitmap coverage Eric Blake
2020-05-18 14:43   ` Vladimir Sementsov-Ogievskiy

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=1afffb4d-5bd6-7674-bc6d-d3482ec78920@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=nsoffer@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.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.