From: Andrey Borzenkov <arvidjaar@mail.ru>
To: linux-hotplug@vger.kernel.org
Subject: Accessing device information in REMOVE agent
Date: Sat, 08 Nov 2003 13:02:25 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-106829667618187@msgid-missing> (raw)
I'd like to be notified when block device goes away (e.g. USB stick unplugged)
basically to look if device is in use and possibly initiate clean up. Block
hotplug currently is passing only DEVPATH; but it alone is not reliable way
to identify it; device may be used under alias names via symbolic links.
Is it safe to access /sys/$DEVPATH in REMOVE agent? Apparently hotplug is
called asynchronously i.e. it is possible that /sys entry is already removed?
Would it make sense to add device number? It seems to be natural native "block
device ID" :)
TIA
-andrey
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next reply other threads:[~2003-11-08 13:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-08 13:02 Andrey Borzenkov [this message]
2003-11-08 22:25 ` Accessing device information in REMOVE agent Greg KH
2003-11-09 10:06 ` Andrey Borzenkov
2003-11-09 19:50 ` Greg KH
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=marc-linux-hotplug-106829667618187@msgid-missing \
--to=arvidjaar@mail.ru \
--cc=linux-hotplug@vger.kernel.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).