Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jan 2005 17:01:27 +0000 (GMT)
From:      Robert Watson <rwatson@freebsd.org>
To:        Warner Losh <imp@rover.village.org>
Cc:        imp@bsdimp.com
Subject:   Re: Devd event from GEOM?
Message-ID:  <Pine.NEB.3.96L.1050125165810.3036G-100000@fledge.watson.org>
In-Reply-To: <20050125.095019.71141844.imp@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tue, 25 Jan 2005, Warner Losh wrote:

> > each abstraction layer can declare the events it knows about.  newbus
> > announces "I found a route to a physical device", GEOM shouts "And I found
> > some storage space on it", etc.
> 
> Actually, GEOM will announce all the layers as well, since it is an
> onion sort of thing.  For the degenerate case of FAT on FLASH Stick, it
> is easy, because you don't see the layers.  But I routinely plug in CF
> cards that have FreeBSD file systems on them, as well as an emergency
> DOS partition.  Those sort of cases make whatever automounting daemon
> need to grow a lot of brains, and will have multiple events. 

A simple auto-mounter simply watches for every storage device that arrives
via GEOM, checks to see if it's leaf class, and if it is, tastes for a
file system header, auto-detecting some of the simple and common types,
such as FAT, UFS, UFS2, cd9660.  It can then use whatever logic it
pleases, probably partly from a config file, to decide where to mount it,
what security parameters to use, etc.  Here-in lies the key:  because devd
says "a storage device, /dev/ad0s1a arrived", it knows it can just go
ahead and taste, not worrying about rewinding the tape, reading from
kernel memory, etc.  The auto-mounter specifically wants to hear only
about GEOMs.

Robert N M Watson




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1050125165810.3036G-100000>