linux/init
Sasha Levin 377485f624 init: don't try mounting device as nfs root unless type fully matches
Currently, we'll try mounting any device who's major device number is
UNNAMED_MAJOR as NFS root.  This would happen for non-NFS devices as
well (such as 9p devices) but it wouldn't cause any issues since
mounting the device as NFS would fail quickly and the code proceeded to
doing the proper mount:

       [  101.522716] VFS: Unable to mount root fs via NFS, trying floppy.
       [  101.534499] VFS: Mounted root (9p filesystem) on device 0:18.

Commit 6829a048102a ("NFS: Retry mounting NFSROOT") introduced retries
when mounting NFS root, which means that now we don't immediately fail
and instead it takes an additional 90+ seconds until we stop retrying,
which has revealed the issue this patch fixes.

This meant that it would take an additional 90 seconds to boot when
we're not using a device type which gets detected in order before NFS.

This patch modifies the NFS type check to require device type to be
'Root_NFS' instead of requiring the device to have an UNNAMED_MAJOR
major.  This makes boot process cleaner since we now won't go through
the NFS mounting code at all when the device isn't an NFS root
("/dev/nfs").

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-05 10:04:40 -07:00
..
calibrate.c init: check printed flag to skip printing message 2012-03-23 16:58:38 -07:00
do_mounts_initrd.c get rid of pointless includes of ext2_fs.h 2012-03-31 16:03:15 -04:00
do_mounts_md.c
do_mounts_rd.c new helper: ext2_image_size() 2012-03-31 16:03:16 -04:00
do_mounts.c init: don't try mounting device as nfs root unless type fully matches 2012-05-05 10:04:40 -07:00
do_mounts.h
initramfs.c
Kconfig documentation: remove references to cpu_*_map. 2012-03-29 15:38:31 +10:30
main.c init: fix bug where environment vars can't be passed via boot args 2012-04-25 11:47:29 -04:00
Makefile
noinitramfs.c
version.c