Re: BUG in SCSI async scanning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 7 Aug 2007, James Bottomley wrote:

> On Tue, 2007-08-07 at 12:54 -0400, Alan Stern wrote:
> > Can somebody explain the reason for calling a separate 
> > scsi_sysfs_add_devices() routine in the async scanning code instead of 
> > just calling scsi_sysfs_add_sdev() normally from within scsi_add_lun()?
> 
> Matthew's away at the moment, so I'll speak for him.
> 
> The reason is so that the order of device enumeration remains
> approximately constant.   We didn't necessarily want completely random
> and timing related enumerations with the async scanning patch.

If you say so.  But aren't synchronous enumerations just about as 
random and timing-related?  I guess you're concerned about cases where 
multiple SCSI buses are scanned in parallel.

> > This peculiar delayed approach has introduced a bug.  It evades the
> > protection provided by shost->scan_mutex and as a result, if a host is
> > hot-unplugged in the middle of an async scan, the SCSI core will
> > attempt to unregister the host's devices before they have been
> > registered!  Obviously this is not good.
> 
> Does this patch fix it:
> 
> http://marc.info/?l=linux-scsi&m=118289275414202
> 
> ? it's one of a number designed to address the problems.

Yes it does, thank you very much.  I urge you to send the patch 
upstream in time for 2.6.23 and also to submit it for the 2.6.22-stable 
branch (if you haven't done so already).

Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux