netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paulo Alcantara (SUSE)" <pc@cjr.nz>
To: netdev@vger.kernel.org, linux-cifs@vger.kernel.org,
	samba-technical@lists.samba.org, davem@davemloft.net,
	smfrench@gmail.com
Cc: "Paulo Alcantara (SUSE)" <pc@cjr.nz>
Subject: [PATCH net-next 0/2] Experimental SMB rootfs support
Date: Tue,  1 Oct 2019 14:10:26 -0300	[thread overview]
Message-ID: <20191001171028.23356-1-pc@cjr.nz> (raw)

Hi,

This patch series enables Linux to mount root file systems over the
network by utilizing SMB protocol.

Upstream commit 8eecd1c2e5bc ("cifs: Add support for root file
systems") introduced a new CONFIG_CIFS_ROOT option, a virtual device
(Root_CIFS) and a kernel cmdline parameter "cifsroot=" which tells the
kernel to actually mount the root filesystem over a SMB share.

The feature relies on ipconfig to set up the network prior to mounting
the rootfs, so when it is set along with "cifsroot=" parameter:

    (1) cifs_root_setup() parses all necessary data out of "cifsroot="
    parameter for the init process know how to mount the SMB rootfs
    (e.g. SMB server address, mount options).

    (2) If DHCP failed for some reason in ipconfig, we keep retrying
    forever as we have nowhere to go for NFS or SMB root
    filesystems (see PATCH 2/2). Otherwise go to (3).

    (3) mount_cifs_root() is then called by mount_root() (ROOT_DEV ==
    Root_CIFS), retrieves early parsed data from (1), then attempt to
    mount SMB rootfs by CIFSROOT_RETRY_MAX times at most (see PATCH
    1/2).

    (4) If all attempts failed, fall back to floppy drive, otherwise
    continue the boot process with rootfs mounted over a SMB share.

My idea was to keep the same behavior of nfsroot - as it seems to work
for most users so far.

For more information on how this feature works, see
Documentation/filesystems/cifs/cifsroot.txt.

Paulo Alcantara (SUSE) (2):
  init: Support mounting root file systems over SMB
  ipconfig: Handle CONFIG_CIFS_ROOT option

 init/do_mounts.c    | 49 +++++++++++++++++++++++++++++++++++++++++++++
 net/ipv4/ipconfig.c | 10 +++++++--
 2 files changed, 57 insertions(+), 2 deletions(-)

-- 
2.23.0


             reply	other threads:[~2019-10-01 17:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-01 17:10 Paulo Alcantara (SUSE) [this message]
2019-10-01 17:10 ` [PATCH net-next 1/2] init: Support mounting root file systems over SMB Paulo Alcantara (SUSE)
2019-10-01 17:10 ` [PATCH net-next 2/2] ipconfig: Handle CONFIG_CIFS_ROOT option Paulo Alcantara (SUSE)
2019-10-02 16:15 ` [PATCH net-next 0/2] Experimental SMB rootfs support David Miller
2019-11-27  4:57 ` Fwd: " Steve French

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=20191001171028.23356-1-pc@cjr.nz \
    --to=pc@cjr.nz \
    --cc=davem@davemloft.net \
    --cc=linux-cifs@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=samba-technical@lists.samba.org \
    --cc=smfrench@gmail.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;
as well as URLs for NNTP newsgroup(s).