From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: USB forceful removal
Date: Tue, 8 Jul 2014 11:55:22 -0700 [thread overview]
Message-ID: <20140708185522.GA17779@kroah.com> (raw)
In-Reply-To: <CAGAs2AkMAVU-_c8=Ephdsot3BRBMpt7H3pQHWDyJGMD-0zEy4w@mail.gmail.com>
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
next prev parent reply other threads:[~2014-07-08 18:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-08 18:43 USB forceful removal AYAN KUMAR HALDER
2014-07-08 18:55 ` Greg KH [this message]
2014-07-08 22:17 ` Greg Freemyer
2014-07-08 22:33 ` Greg KH
2014-07-09 19:06 ` AYAN KUMAR HALDER
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140708185522.GA17779@kroah.com \
--to=greg@kroah.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).