From: Eric Blake <eblake@redhat.com>
To: roman.stratiienko@globallogic.com, linux-kernel@vger.kernel.org,
josef@toxicpanda.com, nbd@other.debian.org,
A.Bulyshchenko@globallogic.com, linux-block@vger.kernel.org,
axboe@kernel.dkn.org, "Richard W.M. Jones" <rjones@redhat.com>
Subject: Re: [PATCH 2/2] nbd: add support for nbd as root device
Date: Thu, 13 Jun 2019 08:14:23 -0500 [thread overview]
Message-ID: <9719bfd9-b8a7-93be-4c72-20c15bd9b0ca@redhat.com> (raw)
In-Reply-To: <b988f702-f394-6f2e-43ea-61298c0f2b03@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 2441 bytes --]
On 6/13/19 8:02 AM, Eric Blake wrote:
> On 6/12/19 11:31 AM, roman.stratiienko@globallogic.com wrote:
>> From: Roman Stratiienko <roman.stratiienko@globallogic.com>
>>
>> Adding support to nbd to use it as a root device. This code essentially
>> provides a minimal nbd-client implementation within the kernel. It opens
>> a socket and makes the negotiation with the server. Afterwards it passes
>> the socket to the normal nbd-code to handle the connection.
>>
>> The arguments for the server are passed via kernel command line.
>> The kernel command line has the format
>> 'nbdroot=[<SERVER_IP>:]<SERVER_PORT>/<EXPORT_NAME>'.
>
> Did you intend for nbdroot=1234 to connect to port 1234 or to server
> 1234 port 10809? Is an export name mandatory even when it is the empty
> string, in which case, is the / character mandatory? Maybe this would
> be better written as:
>
> [<SERVER_IP>[:<SERVER_PORT]][/<EXPORT_NAME]
Make that:
[[<SERVER_IP>][:<SERVER_PORT>]][/[<EXPORT_NAME>]]
as well as a blurb that IPv6 requires use of [] around SERVER_IP to
avoid ambiguity between IP address and the port designator. That would
allow variations such as:
nbdroot=1.2.3.4 # port 10809 and export name '' defaulted
nbdroot=1.2.3.4:10809/ # fully explicit, export name ''
nbdroot=:10810/export # host defaulted by DHCP, rest is explicit
nbdroot=/ # host and port are defaulted, export is ''
nbdroot=[::1]:10810 # IPv6 localhost and port 10810
nbdroot=::1 # IPv6 localhost, default port 10809
[I'm aware that localhost is probably not going to work based on how
early this is encountered during the boot; rather, consider ::1 as a
placeholder for a more realistic IPv6 address]
>
> although that would allow nbdroot= using all defaults (will that still
> do the right thing?).
nbdroot= # host from DHCP, port 10809, export ''
>
> Should we support nbdroot=URI, and tie this in to Rich's proposal [1] on
> standardizing the set of URIs that refer to an NBD export? It seems
> like you are still limited to a TCP socket (not Unix) with no
> encryption, so this would be equivalent to the URI:
>
> nbd://[server[:port]][/export]
>
> [1] https://lists.debian.org/nbd/2019/06/msg00011.html
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-06-13 15:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-12 16:31 [PATCH 1/2] nbd: make sock_xmit() and nbd_add_socket() more generic roman.stratiienko
2019-06-12 16:31 ` [PATCH 2/2] nbd: add support for nbd as root device roman.stratiienko
2019-06-13 12:56 ` Eric Blake
2019-06-13 13:02 ` Eric Blake
2019-06-13 13:14 ` Eric Blake [this message]
2019-06-13 13:52 ` Josef Bacik
2019-06-13 14:45 ` Roman Stratiienko
2019-06-13 14:55 ` Josef Bacik
2019-06-13 16:21 ` Roman Stratiienko
2019-06-13 16:54 ` Josef Bacik
2019-06-14 10:33 ` Wouter Verhelst
2019-06-14 13:38 ` Josef Bacik
2019-06-14 21:23 ` Wouter Verhelst
2019-06-13 15:14 ` Eric Blake
2019-06-13 16:05 ` Roman Stratiienko
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=9719bfd9-b8a7-93be-4c72-20c15bd9b0ca@redhat.com \
--to=eblake@redhat.com \
--cc=A.Bulyshchenko@globallogic.com \
--cc=axboe@kernel.dkn.org \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nbd@other.debian.org \
--cc=rjones@redhat.com \
--cc=roman.stratiienko@globallogic.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
all inboxes | Powered by JetHome®