mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Pargmann <mpa@pengutronix.de>
To: Wouter Verhelst <w@uter.be>
Cc: nbd-general@lists.sourceforge.net,
	Paul Clements <Paul.Clements@steeleye.com>,
	linux-kernel@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [Nbd] [RFC 4/4] nbd: Add support for nbd as root device
Date: Sat, 31 Jan 2015 13:38:21 +0100	[thread overview]
Message-ID: <20150131123821.GI16879@pengutronix.de> (raw)
In-Reply-To: <20150130173014.GA16754@grep.be>

[-- Attachment #1: Type: text/plain, Size: 2716 bytes --]

On Fri, Jan 30, 2015 at 06:30:14PM +0100, Wouter Verhelst wrote:
> On Fri, Jan 30, 2015 at 09:04:00AM +0100, Markus Pargmann wrote:
> > Hi,
> > 
> > On Fri, Jan 30, 2015 at 12:42:54AM +0100, Wouter Verhelst wrote:
> > > Not that I'm opposed to this, but you do realize that doing nbd-client
> > > from initramfs or similar is possible, right? Most initramfs
> > > implementations these days support it.
> > 
> > Yes, that was the first idea how to implement a complete netboot for an
> > embedded ARM device. However, an initramfs is at least around 1MB in
> > size which has to be loaded using tftp. As the essential nbd-client
> > connection setup and negotiation is quite small I decided to go with
> > nbd-root support.
> > 
> > Also it is quite useful to have nbd-root support much like nfsroot
> > directly built-in for debugging purposes. It has the big advantage of
> > booting/testing read-only filesystem images for embedded systems without
> > the need for an initramfs.
> 
> Fair enough, just thought I'd point it out.
> 
> When looking at your patch set, two things pop out which you should
> probably look at:
> - What will happen if someone boots with root-on-NBD in your scheme and
>   later does a pivot_root() followed by an NBD_DISCONNECT ioctl on the
>   device?

Good point. I will look if it works or fix it otherwise.

> - When a connection is started by nbd-client, the kernel creates a "pid"
>   file in sysfs, which contains the PID of the client and which the
>   client (when called with -c, or in other cases) uses to verify whether
>   a device is connected. At first glance, your patch does not do this,
>   which could cause confusion.

I am actually not quite happy to expose the pid of the task that is
doing the receive handling through sysfs. As it is already in the code,
we can't simply remove it. But I think this should be managed by
userspace if it is necessary at some point. It seems like the pid is
only used for the connection status?

Maybe it would be better to expose the connection status directly and
deprecate the 'pid' file.

> 
> I must admit I haven't checked your patch very well (my kernel fu isn't
> that advanced) so I might have missed something, but I'd rather point
> it out now than have to fix the pieces afterwards ;-)

Yes better to discuss it before things break :).

Thanks,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-01-31 12:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 13:44 [RFC 0/4] nbd: root device support Markus Pargmann
2015-01-13 13:44 ` [RFC 1/4] nbd: Replace kthread_create with kthread_run Markus Pargmann
2015-01-13 13:44 ` [RFC 2/4] nbd: Split 'DO_IT' into three functions Markus Pargmann
2015-01-26 16:16   ` Paul Clements
2015-01-26 16:23     ` Markus Pargmann
2015-01-13 13:44 ` [RFC 3/4] nbd: Create helper functions for ioctls Markus Pargmann
2015-01-28 21:04   ` Paul Clements
2015-01-30  7:54     ` Markus Pargmann
2015-01-13 13:44 ` [RFC 4/4] nbd: Add support for nbd as root device Markus Pargmann
2015-01-20 11:51   ` Markus Pargmann
2015-01-29 23:42   ` [Nbd] " Wouter Verhelst
2015-01-30  8:04     ` Markus Pargmann
2015-01-30 17:30       ` Wouter Verhelst
2015-01-31 12:38         ` Markus Pargmann [this message]
     [not found]           ` <CAECXXi5+VhBeZwZ5aosc+Oc+0bCZbJZTjzYA-QTRrJCjs2NFOw@mail.gmail.com>
2015-01-31 14:43             ` Andreas Klauer
2015-01-31 15:45               ` Markus Pargmann
2015-01-31 15:00             ` Markus Pargmann
2015-01-30 18:10       ` [Nbd] " H. Peter Anvin
2015-01-31 12:08         ` Markus Pargmann

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=20150131123821.GI16879@pengutronix.de \
    --to=mpa@pengutronix.de \
    --cc=Paul.Clements@steeleye.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nbd-general@lists.sourceforge.net \
    --cc=w@uter.be \
    /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

Powered by JetHome