]> git.baikalelectronics.ru Git - kernel.git/commit
init: allow mounting arbitrary non-blockdevice filesystems as root
authorChristoph Hellwig <hch@lst.de>
Wed, 14 Jul 2021 20:23:20 +0000 (16:23 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 23 Aug 2021 05:25:40 +0000 (01:25 -0400)
commitf40876ac0c3a00a56ebbeffcc30ab7bff6c1f535
tree6452f96496ca16dcbfd766126489729ca9832125
parentf816c018f966c8be0e736c3cdb05b03349f161b4
init: allow mounting arbitrary non-blockdevice filesystems as root

Currently the only non-blockdevice filesystems that can be used as the
initial root filesystem are NFS and CIFS, which use the magic
"root=/dev/nfs" and "root=/dev/cifs" syntax that requires the root
device file system details to come from filesystem specific kernel
command line options.

Add a little bit of new code that allows to just pass arbitrary
string mount options to any non-blockdevice filesystems so that it can
be mounted as the root file system.

For example a virtiofs root file system can be mounted using the
following syntax:

"root=myfs rootfstype=virtiofs rw"

Based on an earlier patch from Vivek Goyal <vgoyal@redhat.com>.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
init/do_mounts.c