diff mbox series

docs: Better mention of qemu-img amend limitations

Message ID 20200923203719.732958-1-eblake@redhat.com
State New
Headers show
Series docs: Better mention of qemu-img amend limitations | expand

Commit Message

Eric Blake Sept. 23, 2020, 8:37 p.m. UTC
Missed during merge resolution of commit bc5ee6da71.

Signed-off-by: Eric Blake <eblake@redhat.com>
---
 docs/tools/qemu-img.rst | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Nir Soffer Sept. 23, 2020, 9:56 p.m. UTC | #1
On Wed, Sep 23, 2020 at 11:38 PM Eric Blake <eblake@redhat.com> wrote:
>
> Missed during merge resolution of commit bc5ee6da71.
>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
>  docs/tools/qemu-img.rst | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst
> index c35bd6482203..2b5891b54db7 100644
> --- a/docs/tools/qemu-img.rst
> +++ b/docs/tools/qemu-img.rst
> @@ -265,6 +265,10 @@ Command description:
>    --force allows some unsafe operations. Currently for -f luks, it allows to
>    erase the last encryption key, and to overwrite an active encryption key.
>
> +  The set of options that can be amended are dependent on the image
> +  format, but note that amending the backing chain relationship should
> +  instead be performed with ``qemu-img rebase``.

Because of the backing format?

> +
>  .. option:: bench [-c COUNT] [-d DEPTH] [-f FMT] [--flush-interval=FLUSH_INTERVAL] [-i AIO] [-n] [--no-drain] [-o OFFSET] [--pattern=PATTERN] [-q] [-s BUFFER_SIZE] [-S STEP_SIZE] [-t CACHE] [-w] [-U] FILENAME
>
>    Run a simple sequential I/O benchmark on the specified image. If ``-w`` is
> --
> 2.28.0
>
>
Eric Blake Oct. 20, 2020, 3:44 p.m. UTC | #2
On 9/23/20 4:56 PM, Nir Soffer wrote:
> On Wed, Sep 23, 2020 at 11:38 PM Eric Blake <eblake@redhat.com> wrote:
>>
>> Missed during merge resolution of commit bc5ee6da71.
>>
>> Signed-off-by: Eric Blake <eblake@redhat.com>
>> ---
>>  docs/tools/qemu-img.rst | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst
>> index c35bd6482203..2b5891b54db7 100644
>> --- a/docs/tools/qemu-img.rst
>> +++ b/docs/tools/qemu-img.rst
>> @@ -265,6 +265,10 @@ Command description:
>>    --force allows some unsafe operations. Currently for -f luks, it allows to
>>    erase the last encryption key, and to overwrite an active encryption key.
>>
>> +  The set of options that can be amended are dependent on the image
>> +  format, but note that amending the backing chain relationship should
>> +  instead be performed with ``qemu-img rebase``.
> 
> Because of the backing format?

Sorry for not answering this earlier (and now this serves as a ping for
the patch):

Consider if you have:

Base.raw <- Overlay.qcow2

and want to rebase it to:

Base.qcow2 <- Overlay.qcow2

where Base.raw and Base.qcow2 contain identical guest-visible content.
The problem at hand is that 'qemu-amend' needs to know what the backing
format is both before the rebase (to know how to properly read the
existing image) and after the rebase (to ensure that future opens of
Overlay.qcow2 still properly read the backing format).  But there is no
obvious command-line spelling to specify the difference between the
backing format pre-amend and the backing format post-amend.  Maybe we
could add that, but I felt it was easier to just document that instead
of trying to amend the image (which involves multiple steps, and may
require upgrading/downgrading between v2 and v3, which in turn may
affect decisions on efficiency of representing regions of zero) at the
same time as the backing file/format, it's easier to just update the
backing file/format with a stand-alone command.

I can add that to the commit message, if the patch itself is reasonable.
Eric Blake Nov. 12, 2020, 9:10 p.m. UTC | #3
Ping^2

On 10/20/20 10:44 AM, Eric Blake wrote:
> On 9/23/20 4:56 PM, Nir Soffer wrote:

>> On Wed, Sep 23, 2020 at 11:38 PM Eric Blake <eblake@redhat.com> wrote:

>>>

>>> Missed during merge resolution of commit bc5ee6da71.

>>>

>>> Signed-off-by: Eric Blake <eblake@redhat.com>

>>> ---

>>>  docs/tools/qemu-img.rst | 4 ++++

>>>  1 file changed, 4 insertions(+)

>>>

>>> diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst

>>> index c35bd6482203..2b5891b54db7 100644

>>> --- a/docs/tools/qemu-img.rst

>>> +++ b/docs/tools/qemu-img.rst

>>> @@ -265,6 +265,10 @@ Command description:

>>>    --force allows some unsafe operations. Currently for -f luks, it allows to

>>>    erase the last encryption key, and to overwrite an active encryption key.

>>>

>>> +  The set of options that can be amended are dependent on the image

>>> +  format, but note that amending the backing chain relationship should

>>> +  instead be performed with ``qemu-img rebase``.

>>

>> Because of the backing format?

> 

> Sorry for not answering this earlier (and now this serves as a ping for

> the patch):

> 

> Consider if you have:

> 

> Base.raw <- Overlay.qcow2

> 

> and want to rebase it to:

> 

> Base.qcow2 <- Overlay.qcow2

> 

> where Base.raw and Base.qcow2 contain identical guest-visible content.

> The problem at hand is that 'qemu-amend' needs to know what the backing

> format is both before the rebase (to know how to properly read the

> existing image) and after the rebase (to ensure that future opens of

> Overlay.qcow2 still properly read the backing format).  But there is no

> obvious command-line spelling to specify the difference between the

> backing format pre-amend and the backing format post-amend.  Maybe we

> could add that, but I felt it was easier to just document that instead

> of trying to amend the image (which involves multiple steps, and may

> require upgrading/downgrading between v2 and v3, which in turn may

> affect decisions on efficiency of representing regions of zero) at the

> same time as the backing file/format, it's easier to just update the

> backing file/format with a stand-alone command.

> 

> I can add that to the commit message, if the patch itself is reasonable.

> 


-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org
Kevin Wolf Nov. 13, 2020, 9:49 a.m. UTC | #4
Am 23.09.2020 um 22:37 hat Eric Blake geschrieben:
> Missed during merge resolution of commit bc5ee6da71.

> 

> Signed-off-by: Eric Blake <eblake@redhat.com>

> ---

>  docs/tools/qemu-img.rst | 4 ++++

>  1 file changed, 4 insertions(+)

> 

> diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst

> index c35bd6482203..2b5891b54db7 100644

> --- a/docs/tools/qemu-img.rst

> +++ b/docs/tools/qemu-img.rst

> @@ -265,6 +265,10 @@ Command description:


Adding a little more context:

>    The set of options that can be amended are dependent on the image

>    format, but note that amending the backing chain relationship should

>    instead be performed with ``qemu-img rebase``.

>

>    --force allows some unsafe operations. Currently for -f luks, it allows to

>    erase the last encryption key, and to overwrite an active encryption key.

> 

> +  The set of options that can be amended are dependent on the image

> +  format, but note that amending the backing chain relationship should

> +  instead be performed with ``qemu-img rebase``.

> +


I think the problem is your local conflict resolution. This patch would
duplicate the paragraph.

Kevin
Eric Blake Nov. 13, 2020, 1:40 p.m. UTC | #5
On 11/13/20 3:49 AM, Kevin Wolf wrote:
> Am 23.09.2020 um 22:37 hat Eric Blake geschrieben:

>> Missed during merge resolution of commit bc5ee6da71.

>>

>> Signed-off-by: Eric Blake <eblake@redhat.com>

>> ---

>>  docs/tools/qemu-img.rst | 4 ++++

>>  1 file changed, 4 insertions(+)

>>

>> diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst

>> index c35bd6482203..2b5891b54db7 100644

>> --- a/docs/tools/qemu-img.rst

>> +++ b/docs/tools/qemu-img.rst

>> @@ -265,6 +265,10 @@ Command description:

> 

> Adding a little more context:

> 

>>    The set of options that can be amended are dependent on the image

>>    format, but note that amending the backing chain relationship should

>>    instead be performed with ``qemu-img rebase``.

>>

>>    --force allows some unsafe operations. Currently for -f luks, it allows to

>>    erase the last encryption key, and to overwrite an active encryption key.

>>

>> +  The set of options that can be amended are dependent on the image

>> +  format, but note that amending the backing chain relationship should

>> +  instead be performed with ``qemu-img rebase``.

>> +

> 

> I think the problem is your local conflict resolution. This patch would

> duplicate the paragraph.


D'oh.  Thanks for spotting that, patch withdrawn.


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

Patch

diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst
index c35bd6482203..2b5891b54db7 100644
--- a/docs/tools/qemu-img.rst
+++ b/docs/tools/qemu-img.rst
@@ -265,6 +265,10 @@  Command description:
   --force allows some unsafe operations. Currently for -f luks, it allows to
   erase the last encryption key, and to overwrite an active encryption key.

+  The set of options that can be amended are dependent on the image
+  format, but note that amending the backing chain relationship should
+  instead be performed with ``qemu-img rebase``.
+
 .. option:: bench [-c COUNT] [-d DEPTH] [-f FMT] [--flush-interval=FLUSH_INTERVAL] [-i AIO] [-n] [--no-drain] [-o OFFSET] [--pattern=PATTERN] [-q] [-s BUFFER_SIZE] [-S STEP_SIZE] [-t CACHE] [-w] [-U] FILENAME

   Run a simple sequential I/O benchmark on the specified image. If ``-w`` is