linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* File operation on removed USB memory stick
@ 2008-01-23 10:17 Joaquim Duran
  0 siblings, 0 replies; only message in thread
From: Joaquim Duran @ 2008-01-23 10:17 UTC (permalink / raw)
  To: linux-scsi

Dear all,

I'm new to this e-mail list. My name is Joaquim Duran.

I've detected a behavior of the SCSI system that could be improved when
accessing to a removed USB memory stick.

That is, I was playing musing from a mounted USB stick, then I removed
it while the program was still running. The program stopped with an
error after few seconds. I checked the message log file and saw that the
I/O operations to a file of the memory stick were done 3 times before
notify the fault to the application. The logs:

Jan 23 09:36:47 adlab127 sdf: sdf1
Jan 23 09:36:47 adlab127 sd 2:0:0:0: [sdf] Attached SCSI removable disk
Jan 23 09:36:47 adlab127 sd 2:0:0:0: Attached scsi generic sg4 type 0
Jan 23 09:36:47 adlab127 usb-storage: device scan complete
Jan 23 09:36:47 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:47 adlab127 FAT: Directory bread(block 127) failed
Jan 23 09:36:47 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:47 adlab127 FAT: Directory bread(block 128) failed
Jan 23 09:36:47 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:47 adlab127 FAT: Directory bread(block 129) failed
Jan 23 09:36:47 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:47 adlab127 FAT: Directory bread(block 130) failed
Jan 23 09:36:47 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:47 adlab127 FAT: Directory bread(block 131) failed
Jan 23 09:36:47 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:47 adlab127 FAT: Directory bread(block 132) failed
Jan 23 09:36:47 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:47 adlab127 FAT: Directory bread(block 133) failed
Jan 23 09:36:47 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:47 adlab127 FAT: Directory bread(block 134) failed
Jan 23 09:36:47 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:47 adlab127 FAT: Directory bread(block 127) failed
Jan 23 09:36:47 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:47 adlab127 FAT: Directory bread(block 128) failed
Jan 23 09:36:47 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:47 adlab127 FAT: Directory bread(block 129) failed
Jan 23 09:36:47 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:47 adlab127 FAT: Directory bread(block 130) failed
Jan 23 09:36:47 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:47 adlab127 FAT: Directory bread(block 131) failed
Jan 23 09:36:47 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:47 adlab127 FAT: Directory bread(block 132) failed
Jan 23 09:36:47 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:47 adlab127 FAT: Directory bread(block 133) failed
Jan 23 09:36:47 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:47 adlab127 FAT: Directory bread(block 134) failed
Jan 23 09:36:58 adlab127 scsi 1:0:0:0: rejecting I/O to dead device
Jan 23 09:36:58 adlab127 FAT: unable to read inode block for updating
(i_pos 7582155)

If the memory stick has been removed, a more severe error could be
notified to the application avoiding the repetition of the operations.

In general IMHO, the behavior to this situation would be:

1 - Move all cache blocks of the removed memory USB stick to the free list.

2 - Any operation relating to the removed device be notified as a severe
error avoiding repetitions.

because if the USB stick is removed in inserted once again it will be
mounted as a different device that the current one, because as still
there is files in use, the device could not be unmounted from system.

Thanks and Best Regards,
Joaquim Duran

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-23  9:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-23 10:17 File operation on removed USB memory stick Joaquim Duran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).