Re: USB forceful removal

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

 



On Wed, Jul 09, 2014 at 12:13:28AM +0530, AYAN KUMAR HALDER wrote:
> Hi All,
> 
> When a usb mass-storage is attached for the first time, it gets a
> device (/dev/sda).
> 
> When it is mounted and the device is manually removed and then when it
> is attached again, it gets a different name ie /dev/sdb.

Really?  Not on my system, what kernel are you using?

> This is because earlier the mass-storage device was removed (manually)
> when it was mounted, so scsi_disk_release() did not get called as the
> device (sda) had a reference count > 1.

It should have...

> So, if my understanding is correct, I would like to know if the above
> mentioned behaviour is a bug or a limitation of the kernel?

What is wrong with the device node showing back up as /dev/sdb?  You
shouldn't be relying on a device node name for doing anything "real"
anyway, that's what /dev/disk/ is there for, the persistent links are
designed for you to mount with.

thanks,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux