mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Dharm <mdharm-kernel@one-eyed-alien.net>
To: Greg KH <greg@kroah.com>
Cc: Pekka J Enberg <penberg@cs.helsinki.fi>,
	Alan Stern <stern@rowland.harvard.edu>,
	linux-kernel@vger.kernel.org, dsd@gentoo.org,
	linux-usb@vger.kernel.org, vegardno@ifi.uio.no,
	James.Bottomley@HansenPartnership.com,
	linux-scsi@vger.kernel.org
Subject: Re: [RFC/PATCH] usb-storage: wait for device scanning before mounting root
Date: Thu, 24 Apr 2008 16:30:48 -0700	[thread overview]
Message-ID: <20080424233048.GQ16272@one-eyed-alien.net> (raw)
In-Reply-To: <20080424225604.GA18737@kroah.com>

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

On Thu, Apr 24, 2008 at 03:56:04PM -0700, Greg KH wrote:
> On Fri, Apr 25, 2008 at 12:25:04AM +0300, Pekka J Enberg wrote:
> > On Thu, 24 Apr 2008, Pekka J Enberg wrote:
> > > > From: Pekka Enberg <penberg@cs.helsinki.fi>
> > > > 
> > > > Add a new kernel config option CONFIG_LATE_ROOT_MOUNT that makes the kernel
> > > > wait until background scanning of USB mass storage devices is complete before
> > > > attempting to mount the root filesystem.
> > > > 
> > > > The config option is an alternative to the root_delay= kernel parameter
> > > > solution people currently use to boot from USB mass storage devices.
> > 
> > On Thu, 24 Apr 2008, Alan Stern wrote:
> > > This doesn't take into account what happens when CONFIG_SCSI_SCAN_ASYNC
> > > is set.
> > 
> > Oh, right. Thanks! So something like the following should take care of it.
> > 
> > 		Pekka
> > 
> > Subject: [RFC/PATCH] usb-storage: wait for device scanning before mounting root V2
> > From: Pekka Enberg <penberg@cs.helsinki.fi>
> > 
> > Add a new kernel config option CONFIG_LATE_ROOT_MOUNT that makes the kernel
> > wait until background scanning of USB mass storage devices is complete before
> > attempting to mount the root filesystem.
> 
> What happens if there is no USB device present in the system?  Because
> of that, there is no way that this option could ever be enabled by any
> distro or anyone wanting their kernel to run on more than one machine :(
> 
> I don't like it.

This also has all sorts of races between do_mounts 'waiting' and the actual
USB device enumeration.  It's entirely possible that the kernel loads via
BIOS, the USB drivers are loaded, that forces devices to disconnect/reset,
and they take a while to re-enumerate.  During that delay, the kernel gets
to do_mount; now, no devices show in this "waiting for scan" count.

The right way to do this is via initrd and something like devlabel to wait
for a specific device to appear.  On some systems, you may want to wait for
several devices to appear.

I don't like this either.

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

What, are you one of those Microsoft-bashing Linux freaks?
					-- Customer to Greg
User Friendly, 2/10/1999

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

  reply	other threads:[~2008-04-24 23:31 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-24 20:21 Pekka J Enberg
2008-04-24 21:08 ` Alan Stern
2008-04-24 21:25   ` Pekka J Enberg
2008-04-24 22:56     ` Greg KH
2008-04-24 23:30       ` Matthew Dharm [this message]
2008-04-25  6:30         ` Pekka J Enberg
2008-04-25  7:04           ` Matthew Dharm
2008-04-25  8:19             ` Pekka J Enberg
2008-04-25 15:35               ` Matthew Dharm
2008-04-25 16:05               ` Greg KH
2008-04-25  6:09       ` Pekka J Enberg
2008-04-25  7:53     ` Stefan Richter
2008-04-25  8:15       ` Pekka J Enberg
2008-04-25  9:11         ` Matthew Wilcox
2008-06-19 18:23           ` Matthew Wilcox
2008-06-19 18:39             ` Stefan Richter
2008-06-19 18:43               ` Stefan Richter
2008-06-19 18:54               ` Matthew Wilcox
2008-06-19 19:52                 ` Matthew Dharm
2008-06-19 20:49                   ` Matthew Wilcox
2008-06-19 21:19                     ` Stefan Richter
2008-06-19 19:54                 ` Stefan Richter
2008-06-19 20:22                   ` Matthew Wilcox
2008-06-19 20:34                     ` Stefan Richter
2008-06-19 21:39             ` Alan Stern
2008-06-19 23:13               ` David Brownell
2008-06-20  9:53                 ` Gabor Gombas
2008-06-20 14:14                   ` Matthew Dharm
2008-06-20 15:15               ` Vegard Nossum
2008-06-20 15:31                 ` Matthew Wilcox
2008-06-20 15:42                 ` Alan Stern
2008-06-20 16:37                   ` Stefan Richter

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=20080424233048.GQ16272@one-eyed-alien.net \
    --to=mdharm-kernel@one-eyed-alien.net \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=dsd@gentoo.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=stern@rowland.harvard.edu \
    --cc=vegardno@ifi.uio.no \
    /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®