Devd event from GEOM?

Poul-Henning Kamp phk at phk.freebsd.dk
Tue Jan 25 06:45:45 PST 2005


In message <20050125.073258.94555150.imp at bsdimp.com>, "M. Warner Losh" writes:

>: So suppose I'm listening to a devd socket to try and identify storage
>: devices arriving that I can automount.  How do I know which device
>: announcements are for storage devices?
>
>Hmmmm, once upon a time I'd have said 'stat the device, and you know'
>since those would be block devices....

We do actually have an ioctl, FIODTYPE, which will tell you the
"kind" of device, but that requires you to open it (O_NDELAY will
do)

>The trouble is that we don't
>know at that level either, yet when the GEOM even happens, how can we
>be sure that we win that race?

There is no way you can win the race.  The device may already be
gone again by the time you hear about the event.

Welcome to the world of dynamic hardware.


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-current mailing list