It's basically an impossible problem.  Only the device, which might have a
physical sensor to detect removal, can make a positive determination.

Most devices err on the side of caution -- if they are powering up due to a
bus attach, they assume media-change while they were off.  Actually, many
assume media-change at attachment, because they're not sure if they are
attached to the same host.

Most media doesn't have a serial number or any way to uniquely identify it.

Really, the only safe thing to do is assume media-change on
removal/insertion, given that devices (as a generalized term) are
inconsistant in their ability/willingness to indicate media change.

Matt

On Sun, Jul 21, 2002 at 06:27:13PM -0400, Johannes Erdfelt wrote:
> Is there a way to revalidate the media is the same as it was before?
> 
> Thinking about it, it may be difficult to do with the variety of media
> that's out there.
> 
> JE
> 
> On Sun, Jul 21, 2002, Matthew Dharm <[EMAIL PROTECTED]> wrote:
> > That's actually a design feature of the usb-storage driver.  We may have to
> > change it to accomodate those devices which don't indicate media-change
> > properly, unfortunately.
> > 
> > It appears that the 'popular' OSes assume media-change when the device is
> > removed/reinserted.  Sony MemoryStick devices are notorious for this
> > problem.
> > 
> > Matt
> > 
> > On Sun, Jul 21, 2002 at 01:12:49PM -0700, Aurel Wisse wrote:
> > > Just for the record Matthew. Yesterday, by accident, I
> > > unplugged my Maxtor 3000LE *without* umount, but
> > > replugging it without trying to access data on the
> > > disk. Interestingly, everything worked fine, as if the
> > > scsi layer didn't notice ;-). I was then able to
> > > navigate the disk as if it were never gone, and
> > > ungplug it cleanly with the umount unplug sequence. 
> > > 
> > > I was quite impressed by this. 
> > > 
> > > Regards, Aurel
> > > 
> > > 
> > > --- Matthew Dharm <[EMAIL PROTECTED]>
> > > wrote:
> > > > Unplug without umount is bad.  Autofs is _not_
> > > > designed to handle this
> > > > case.
> > > > 
> > > > You need to umount, then eject the device to get the
> > > > size change
> > > > recognized.
> > > 
> > > 
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Yahoo! Health - Feel better, live better
> > > http://health.yahoo.com
> > 
> > -- 
> > Matthew Dharm                              Home: [EMAIL PROTECTED] 
> > Maintainer, Linux USB Mass Storage Driver
> > 
> > Dudes! May the Open Source be with you.
> >                                     -- Eric S. Raymond
> > User Friendly, 12/3/1998
> 
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> [EMAIL PROTECTED]
> To unsubscribe, use the last form field at:
> https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Maintainer, Linux USB Mass Storage Driver

Oh BAY-bee.
                                        -- Dust Puppy to Greg
User Friendly, 12/13/1997

Attachment: msg07834/pgp00000.pgp
Description: PGP signature

Reply via email to