cvs commit: src/sys/sys disk.h src/sys/geom geom_dev.c
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sat May 5 17:02:20 UTC 2007
pjd 2007-05-05 17:02:19 UTC
FreeBSD src repository
Modified files:
sys/sys disk.h
sys/geom geom_dev.c
Log:
Implement three new ioctls that can be used with GEOM provider:
DIOCGFLUSH - Flush write cache (sends BIO_FLUSH).
DIOCGDELETE - Delete data (mark as unused) (sends BIO_DELETE).
DIOCGIDENT - Get provider's uniqe and fixed identifier (asks for
GEOM::ident attribute).
First two are self-explanatory, but the last one might not be. Here are
properties of provider's ident:
- ident value is preserved between reboots,
- provider can be detached/attached and ident is preserved,
- provider's name can change - ident can't,
- ident value should not be based on on-disk metadata; in other words
copying whole data from one disk to another should not yield the same
ident for the other disk,
- there could be more than one provider with the same ident, but only if
they point at exactly the same physical storage, this is the case for
multipathing for example,
- GEOM classes that consumes single providers and provide single providers,
like geli, gbde, should just attach class name to the ident of the
underlying provider,
- ident is an ASCII string (is printable),
- ident is optional and applications can't relay on its presence.
The main purpose for this is that application and remember provider's ident
and once it tries to open provider by its name again, it may compare idents
to be sure this is the right provider. If it is not (idents don't match),
then it can open provider by its ident.
OK'ed by: phk
Revision Changes Path
1.94 +20 -0 src/sys/geom/geom_dev.c
1.42 +32 -0 src/sys/sys/disk.h
More information about the cvs-src
mailing list