[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] nbd-client: Support leading / in NBD URI

From: Ján Tomko
Subject: Re: [PATCH] nbd-client: Support leading / in NBD URI
Date: Wed, 12 Feb 2020 14:33:04 +0100

On Tue, Feb 11, 2020 at 08:31:01PM -0600, Eric Blake wrote:
The NBD URI specification [1] states that only one leading slash at
the beginning of the URI path component is stripped, not all such
slashes.  This becomes important to a patch I just proposed to nbdkit
[2], which would allow the exportname to select a file embedded within
an ext2 image: ext2fs demands an absolute pathname beginning with '/',
and because qemu was inadvertantly stripping it, my nbdkit patch had
to work around the behavior.

[1] https://github.com/NetworkBlockDevice/nbd/blob/master/doc/uri.md
[2] https://www.redhat.com/archives/libguestfs/2020-February/msg00109.html

Note that the qemu bug only affects handling of URIs such as
nbd://host:port//abs/path (where '/abs/path' should be the export
name); it is still possible to use --image-opts and pass the desired
export name with a leading slash directly through JSON even without
this patch.

Signed-off-by: Eric Blake <address@hidden>
block/nbd.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Reviewed-by: Ján Tomko <address@hidden>


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]