All of lore.kernel.org
 help / color / mirror / Atom feed
* Accessing device information in REMOVE agent
@ 2003-11-08 13:02 Andrey Borzenkov
  2003-11-08 22:25 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Andrey Borzenkov @ 2003-11-08 13:02 UTC (permalink / raw)
  To: linux-hotplug

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

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Accessing device information in REMOVE agent
@ 2003-11-08 13:02 Andrey Borzenkov
  2003-11-08 22:25 ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Andrey Borzenkov @ 2003-11-08 13:02 UTC (permalink / raw)
  To: linux-hotplug-devel, linux-kernel

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-11-09 19:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-08 13:02 Accessing device information in REMOVE agent Andrey Borzenkov
2003-11-08 22:25 ` Greg KH
2003-11-09 10:06 ` Andrey Borzenkov
2003-11-09 19:50 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2003-11-08 13:02 Andrey Borzenkov
2003-11-08 22:25 ` Greg KH
2003-11-09 10:06   ` Andrey Borzenkov
2003-11-09 19:50     ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.