mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bill Nottingham <notting@redhat.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	pjones@redhat.com
Subject: Re: [PATCH] Add a 'wait-scan' command to /proc/scsi/scsi.
Date: Thu, 26 Mar 2009 10:47:16 -0400	[thread overview]
Message-ID: <20090326144716.GA5696@nostromo.devel.redhat.com> (raw)
In-Reply-To: <20090325203624.GT14127@parisc-linux.org>

Matthew Wilcox (matthew@wil.cx) said: 
> > Sure, but asking all people who might eventually have to use it
> > to always watch any possible interface addition isn't practical.
> 
> Right.  I asked several people at Red Hat about the interface and I got a
> "yeah, OK, whatever" kind of response.  Clearly you need to educate your
> colleagues to pass these kinds of interface questions along to you.

Heh. Of course, I suspect many of them and I wouldn't see eye-to-eye
in any case.

> > Well, in the case I'm looking at, udev is what's loading the host
> > controllers, and there needs to be some sort of synchronization point
> > between that and LVM invocations, fsck, mount, etc. Since scans
> > aren't sent over as events for udev to catch, 'udevadm settle'
> > isn't enough.
> 
> So ... if we sent a udev event when the scan list was empty, you'd be OK?

I'm CC'ing Peter, who has some more ideas - it would definitely be a good
start, but we'd probably at least need to know when the scan list started
being filled as well.

This also doesn't help with USB, where the scan isn't scheduled until some
indeterminate time after the host is registered, but given that USB is
always hotpluggable, you can never fully be sure there.

Ideally, once we get to the point where:

- MD
- DM/LVM/etc
- fsck
- mount

can all be event-driven on startup, we won't need this. But we're not
there yet.

> > Removing, loading, and removing scsi_wait_scan works
> > here, but it just seems like a kludge.
> 
> I don't quite understand why it was loaded, and not unloaded immediately.

In the initramfs (as we use it) it is, but any time later in userspace it
seems prudent to make sure it's removed first. I toyed with the idea of
having module_init() return an error so that the module unregisters itself
after doing the wait-for-scans, but the error of course propagates back
to userspace, giving lots of ugly messages in the default config.
(You could do a modprobe rule that automatically removes it after
insertion.)

Bill

  reply	other threads:[~2009-03-26 14:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-25 19:00 Bill Nottingham
2009-03-25 19:00 ` [PATCH] Declare PIO_CMAP/GIO_CMAP as compatbile ioctls Bill Nottingham
2009-03-25 19:02   ` Bill Nottingham
2009-03-25 19:01 ` [PATCH] Add a 'wait-scan' command to /proc/scsi/scsi Christoph Hellwig
2009-03-25 19:03   ` Bill Nottingham
2009-03-25 19:26     ` Matthew Wilcox
2009-03-25 19:47       ` Bill Nottingham
2009-03-25 20:36         ` Matthew Wilcox
2009-03-26 14:47           ` Bill Nottingham [this message]
2009-03-26 17:25             ` Kay Sievers

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=20090326144716.GA5696@nostromo.devel.redhat.com \
    --to=notting@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=pjones@redhat.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

all inboxes | Powered by JetHome®