All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Anderson <andmike@us.ibm.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	James Bottomley <James.Bottomley@steeleye.com>,
	Matthew Dharm <mdharm-scsi@one-eyed-alien.net>,
	USB Storage List <usb-storage@one-eyed-alien.net>,
	SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: Notify about errors during initialization
Date: Mon, 5 Jan 2004 15:32:21 -0800	[thread overview]
Message-ID: <20040105233221.GC1936@beaverton.ibm.com> (raw)
In-Reply-To: <20040105221302.A7678@infradead.org>

Christoph Hellwig [hch@infradead.org] wrote:
> On Mon, Jan 05, 2004 at 05:04:59PM -0500, Alan Stern wrote:
> > James:
> > 
> > Can you or someone else on the SCSI development list answer this question?
> > 
> > When a new host is registered and scanned for devices, are we guaranteed
> > that the scanning procedure will be finished when scsi_scan_host()  
> > returns?
> 
> With the current code the scanning activity has finished when we return.
> But I'm not sure whether we should document that assumption - if we're
> moving to parallel scanning that assumption might soon be void.
> 

It would appear that saying the scan requested by scsi_scan_host is
completed when the function returns would be the expected result. The
LLDD writer should be aware that once scsi_add_host has been called
hotplug events to user space could allow the user space to scan and
delete devices through sysfs making assumptions on devices found or not
found iffy.

> > The reason for asking is so that the usb-storage driver can test whether 
> > any devices were found.  Depressingly often some incompatibility causes 
> > the scan to fail, and when that happens it would be nice to put a 
> > notification in the system log, unregister the host, and generally avoid 
> > loading the driver as though everything was okay.
> 
> Hmm.  maybe we should guarantee that scsi_scan_host will have finished
> and introduce a scsi_scan_host_parallel when we go down that route.  Or
> do it the other way and add a serialized version for usb-storage..

I thought we where moving to not calling a scan api from the LLDD and
using hotplug events. Then user space would define the scan policy it
wanted.

-andmike
--
Michael Anderson
andmike@us.ibm.com


  reply	other threads:[~2004-01-05 23:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20031207051634.GB21951@one-eyed-alien.net>
2003-12-08 16:15 ` Notify about errors during initialization Alan Stern
2004-01-05  2:10   ` Matthew Dharm
2004-01-05 22:04     ` Alan Stern
2004-01-05 22:13       ` Christoph Hellwig
2004-01-05 23:32         ` Mike Anderson [this message]
2004-01-06 16:17           ` Christoph Hellwig
2004-01-06 17:15             ` Patrick Mansfield
2004-01-06 17:18               ` Christoph Hellwig
2004-01-06 18:08                 ` Mike Anderson
2004-01-06 18:08                   ` Christoph Hellwig
2004-01-06 19:04                     ` Mike Anderson
2004-01-06 18:07               ` Sysfs attribute file for max_sectors Alan Stern
2004-01-06 18:23                 ` James Bottomley
2004-01-06 19:31                   ` Alan Stern
2004-01-06 19:47                     ` James Bottomley
2004-01-07 16:16                       ` PATCH: (as168) " Alan Stern
2004-01-06 21:11                     ` Patrick Mansfield
2004-01-06 21:14                       ` Jens Axboe
2004-01-06 22:00                       ` Alan Stern

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=20040105233221.GC1936@beaverton.ibm.com \
    --to=andmike@us.ibm.com \
    --cc=James.Bottomley@steeleye.com \
    --cc=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mdharm-scsi@one-eyed-alien.net \
    --cc=stern@rowland.harvard.edu \
    --cc=usb-storage@one-eyed-alien.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.