diff options
author | rwatson <rwatson@FreeBSD.org> | 2003-09-26 22:08:23 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2003-09-26 22:08:23 +0000 |
commit | 70f8d0daf6da86979fbdacedb8fb0864a34b2013 (patch) | |
tree | 2b29d83bc5bbe251d081532a7d3e1b9dbc5f16ec /share/man/man9/disk.9 | |
parent | e8992de78014be68859ff72cd01bd4070c220231 (diff) | |
download | FreeBSD-src-70f8d0daf6da86979fbdacedb8fb0864a34b2013.zip FreeBSD-src-70f8d0daf6da86979fbdacedb8fb0864a34b2013.tar.gz |
Additional information on the memory properties of struct disk
instances: the memory holding a struct disk should be pre-zeroed so
as to initialize any storage framework private data in the structures
properly. In addition, the memory must be writable so that the
private data may be updated.
Pointed out by: phk
Diffstat (limited to 'share/man/man9/disk.9')
-rw-r--r-- | share/man/man9/disk.9 | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/share/man/man9/disk.9 b/share/man/man9/disk.9 index c861f8f..aee3ef7 100644 --- a/share/man/man9/disk.9 +++ b/share/man/man9/disk.9 @@ -46,6 +46,7 @@ components, including .Xr GEOM 4 , and .Xr devfs 5 . +.Pp Each disk device is described by a .Vt "struct disk" structure, which contains a variety of parameters for the disk device, @@ -53,11 +54,17 @@ function pointers for various methods that may be performed on the device, as well as private data storage for the device driver. In addition, some fields are reserved for use by GEOM in managing access to the device and its statistics. -Fields in the structure will generally be assumed not to change once the -structure is submitted to +Because of storage driver framework private data stored in +.Vt "struct disk" , +instances of the structure should be allocated out of writable, pre-zero'd +memory. +.Pp +Public fields in the structure will generally be assumed not to change once +the structure is submitted to .Fn disk_create , and so no explicit locking is employed; drivers that change the values of any of these fields do so at their own risk. +.Pp Memory associated with the .Vt "struct disk" is owned by the device driver, but should not be released until after |