Skip to contentSkip to conversation

rescan bug on 2.5.70 ?

DISCUSSION Steven Dake 2 participants 2 messages May 30, 2003 – May 31, 2003 SCSI

lore
Share & tools
lore
#0 lore raw

Folks,

I attempted
echo "1" > rescan within a device in the scsi sysfs tree on 2.5.70.

The kernel repeatadly printed out the SDA device information. The system was still usable, but it appeared the rescan code was stuck in a loop which dumped printks continuously. Only way out was a reset.

Anyone else seen this behavior ?

Thanks
-steve

#1 lore raw
Quoted 10 lines · Steven Dake

Folks,

I attempted
echo "1" > rescan within a device in the scsi sysfs tree on 2.5.70.

The kernel repeatadly printed out the SDA device information. The system was still usable, but it appeared the rescan code was stuck in a loop which dumped printks continuously. Only way out was a reset.

Anyone else seen this behavior ?

Yes, I tried it out, and hit the same thing. The user program (not sure what C code) is retrying the write, since we return 0. You can kill the program, though I couldn't ^C/intr the echo, I killed it from another terminal.

Trivial patch against current scsi-misc-2.5:

===== drivers/scsi/scsi_sysfs.c 1.21 vs edited =====

drivers/scsi/scsi_sysfs.c +1 -1
@@ -204,7 +204,7 @@
 store_rescan_field (struct device *dev, const char *buf, size_t count) 
 {
 	scsi_rescan_device(dev);
-	return 0;
+	return count;
 }
 
 static DEVICE_ATTR(rescan, S_IRUGO | S_IWUSR, show_rescan_field, store_rescan_field)

-- Patrick Mansfield