From: Max Reitz <mreitz@redhat.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: "reviewer:Incompatible changes" <libvir-list@redhat.com>,
qemu-block@nongnu.org
Subject: Re: [PATCH] qemu-nbd: Removed deprecated --partition option
Date: Thu, 23 Jan 2020 13:10:31 +0100 [thread overview]
Message-ID: <bcf38c8e-c207-73bd-8707-44b500ef3fa2@redhat.com> (raw)
In-Reply-To: <20200122214328.1413664-1-eblake@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 3553 bytes --]
On 22.01.20 22:43, Eric Blake wrote:
> The option was deprecated in 4.0.0 (commit 0ae2d546); it's now been
> long enough with no complaints to follow through with that process.
>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
> qemu-deprecated.texi | 49 ++++++----------
> qemu-nbd.c | 133 +------------------------------------------
> qemu-nbd.texi | 13 ++---
> 3 files changed, 24 insertions(+), 171 deletions(-)
>
> diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
> index 8471eef9c22d..1b4c638db8e0 100644
> --- a/qemu-deprecated.texi
> +++ b/qemu-deprecated.texi
> @@ -304,37 +304,6 @@ The above, converted to the current supported format:
>
> @section Related binaries
>
> -@subsection qemu-nbd --partition (since 4.0.0)
> -
> -The ``qemu-nbd --partition $digit'' code (also spelled @option{-P})
> -can only handle MBR partitions, and has never correctly handled
> -logical partitions beyond partition 5. If you know the offset and
> -length of the partition (perhaps by using @code{sfdisk} within the
> -guest), you can achieve the effect of exporting just that subset of
> -the disk by use of the @option{--image-opts} option with a raw
> -blockdev using the @code{offset} and @code{size} parameters layered on
> -top of any other existing blockdev. For example, if partition 1 is
> -100MiB long starting at 1MiB, the old command:
> -
> -@code{qemu-nbd -t -P 1 -f qcow2 file.qcow2}
> -
> -can be rewritten as:
> -
> -@code{qemu-nbd -t --image-opts driver=raw,offset=1M,size=100M,file.driver=qcow2,file.backing.driver=file,file.backing.filename=file.qcow2}
> -
> -Alternatively, the @code{nbdkit} project provides a more powerful
> -partition filter on top of its nbd plugin, which can be used to select
> -an arbitrary MBR or GPT partition on top of any other full-image NBD
> -export. Using this to rewrite the above example results in:
> -
> -@code{qemu-nbd -t -k /tmp/sock -f qcow2 file.qcow2 &}
> -@code{nbdkit -f --filter=partition nbd socket=/tmp/sock partition=1}
> -
> -Note that if you are exposing the export via /dev/nbd0, it is easier
> -to just export the entire image and then mount only /dev/nbd0p1 than
> -it is to reinvoke @command{qemu-nbd -c /dev/nbd0} limited to just a
> -subset of the image.
> -
> @subsection qemu-img convert -n -o (since 4.2.0)
>
> All options specified in @option{-o} are image creation options, so
> @@ -383,3 +352,21 @@ trouble after a recent upgrade.
>
> The "autoload" parameter has been ignored since 2.12.0. All bitmaps
> are automatically loaded from qcow2 images.
> +
> +@section Related binaries
> +
> +@subsection qemu-nbd --partition (removed in 5.0.0)
> +
> +The ``qemu-nbd --partition $digit'' code (also spelled @option{-P})
> +could only handle MBR partitions, and never correctly handled logical
> +partitions beyond partition 5. Exporting a partition can still be
> +done by utilizing the @option{--image-opts} option with a raw blockdev
> +using the @code{offset} and @code{size} parameters layered on top of
> +any other existing blockdev. For example, if partition 1 is 100MiB
> +long starting at 1MiB, the old command:
> +
> +@code{qemu-nbd -t -P 1 -f qcow2 file.qcow2}
> +
> +can be rewritten as:
> +
> +@code{qemu-nbd -t --image-opts driver=raw,offset=1M,size=100M,file.driver=qcow2,file.backing.driver=file,file.backing.filename=file.qcow2}
I know you just moved it from above, but isn’t this wrong? Shouldn’t it
be s/backing/file/g?
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-01-23 14:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-22 21:43 [PATCH] qemu-nbd: Removed deprecated --partition option Eric Blake
2020-01-22 22:00 ` no-reply
2020-01-23 12:10 ` Max Reitz [this message]
2020-01-23 12:30 ` Eric Blake
2020-01-23 12:44 ` Max Reitz
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=bcf38c8e-c207-73bd-8707-44b500ef3fa2@redhat.com \
--to=mreitz@redhat.com \
--cc=eblake@redhat.com \
--cc=libvir-list@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).