public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Thibaut VARENE <T-Bone@parisc-linux.org>
Cc: Grant Grundler <grundler@parisc-linux.org>,
	James Bottomley <James.Bottomley@steeleye.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] add help to WAIT_SCAN option
Date: Sat, 26 May 2007 17:03:07 -0600	[thread overview]
Message-ID: <20070526230307.GN5798@parisc-linux.org> (raw)
In-Reply-To: <7d01f9f00705261525k56cd1b9ag531640cc212036ae@mail.gmail.com>

On Sun, May 27, 2007 at 12:25:22AM +0200, Thibaut VARENE wrote:
> My problem was that:
> - I use a standalone kernel (no init{rd,ramfs})
> - I have CONFIG_MODULES=y
> - I build all my (needed) scsi drivers 'y' (builtin)

> Yet CONFIG_SCSI_WAIT_SCAN defaults to 'm' with no possibility of
> setting it otherwise. So I ended up with a kernel with builtin async
> scsi scan and no wait_scan, thus not waiting for the probes to
> complete before trying to mount rootfs...

Thanks.  That's expected to work, as it's how I build my kernels too.
Looks like this got broken when other people were trying to fix the
modular case.  It *was* the case that scsi_wait_scan got built in to the
kernel if CONFIG_SCSI was =y.  But of course, that's no good for people
who build with CONFIG_SCSI=y and their driver =m -- they still have to
have a module to load.  And we shouldn't prompt the user for it, we
should determine the right thing to do.

Not even compile tested (but it's at least approximately what the
original async scanning patches used to do):

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index a67f315..2653a06 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -184,6 +184,11 @@ int scsi_complete_async_scans(void)
 /* Only exported for the benefit of scsi_wait_scan */
 EXPORT_SYMBOL_GPL(scsi_complete_async_scans);
 
+/* If everything's built in, we need to wait for everything to scan */
+#ifndef MODULE
+late_initcall(scsi_complete_async_scans);
+#endif
+
 /**
  * scsi_unlock_floptical - unlock device via a special MODE SENSE command
  * @sdev:	scsi device to send command to

  reply	other threads:[~2007-05-26 23:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-26 19:11 [PATCH] add help to WAIT_SCAN option Grant Grundler
2007-05-26 19:50 ` James Bottomley
2007-05-27  0:06   ` Grant Grundler
2007-05-27  0:15     ` James Bottomley
2007-05-27  0:27       ` Matthew Wilcox
2007-05-27  0:29         ` James Bottomley
2007-05-27  0:33           ` Matthew Wilcox
2007-05-27  0:53             ` Grant Grundler
2007-05-26 20:44 ` Matthew Wilcox
2007-05-26 22:25   ` Thibaut VARENE
2007-05-26 23:03     ` Matthew Wilcox [this message]
2007-05-26 23:10       ` Thibaut VARENE
2007-05-27  0:05         ` Matthew Wilcox

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=20070526230307.GN5798@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=James.Bottomley@steeleye.com \
    --cc=T-Bone@parisc-linux.org \
    --cc=grundler@parisc-linux.org \
    --cc=linux-scsi@vger.kernel.org \
    /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