kernel-ark/drivers
Matthew Wilcox 6b7f123f37 [SCSI] Fix async scanning double-add problems
Stress-testing and some thought has revealed some places where
asynchronous scanning needs some more attention to locking.

 - Since async_scan is a bit, we need to hold the host_lock while
   modifying it to prevent races against other CPUs modifying the word
   that bit is in.  This is probably a theoretical race for the moment,
   but other patches may change that.
 - The async_scan bit means not only that this host is being scanned
   asynchronously, but that all the devices attached to this host are not
   yet added to sysfs.  So we must ensure that this bit is always in sync.
   I've chosen to do this with the scan_mutex since it's already acquired
   in most of the right places.
 - If the host changes state to deleted while we're in the middle of
   a scan, we'll end up with some devices on the host's list which must
   be deleted.  Add a check to scsi_sysfs_add_devices() to ensure the
   host is still running.
 - To avoid the async_scan bit being protected by three locks, the
   async_scan_lock now only protects the scanning_list.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12 14:38:24 -04:00
..
acorn/char
acpi
amba
ata
atm
auxdisplay
base
block
bluetooth
cdrom
char
clocksource
connector
cpufreq
crypto
dio
dma
edac
eisa
fc4
firewire
firmware
hid
hwmon
i2c i2c-s3c2410: Build fix 2007-08-14 18:37:15 +02:00
ide
ieee1394
infiniband [SCSI] transport_srp: add rport roles attribute 2007-10-12 14:37:46 -04:00
input
isdn
kvm
leds
lguest
macintosh
mca
md
media
message
mfd
misc
mmc
mtd
net
nubus
of
oprofile
parisc
parport
pci
pcmcia
pnp
power
ps3
rapidio
rtc
s390 [SCSI] zfcp: fix the data buffer accessor patch 2007-08-15 12:28:44 -05:00
sbus
scsi [SCSI] Fix async scanning double-add problems 2007-10-12 14:38:24 -04:00
serial
sh
sn
spi
tc
telephony
uio
usb [SCSI] microtek: use data accessors and !use_sg cleanup 2007-10-12 14:38:21 -04:00
video
w1
xen
zorro
Kconfig
Makefile