Document disk_resize(9).

This commit is contained in:
Edward Tomasz Napierala 2012-10-30 13:05:50 +00:00
parent a492b68b27
commit 207c7ec842
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=242359
2 changed files with 12 additions and 2 deletions

View File

@ -614,7 +614,8 @@ MLINKS+=devstat.9 devicestat.9 \
MLINKS+=disk.9 disk_alloc.9 \ MLINKS+=disk.9 disk_alloc.9 \
disk.9 disk_create.9 \ disk.9 disk_create.9 \
disk.9 disk_destroy.9 \ disk.9 disk_destroy.9 \
disk.9 disk_gone.9 disk.9 disk_gone.9 \
disk.9 disk_resize.9
MLINKS+=domain.9 DOMAIN_SET.9 \ MLINKS+=domain.9 DOMAIN_SET.9 \
domain.9 domain_add.9 \ domain.9 domain_add.9 \
domain.9 pfctlinput.9 \ domain.9 pfctlinput.9 \

View File

@ -27,7 +27,7 @@
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd February 18, 2004 .Dd October 30, 2012
.Dt DISK 9 .Dt DISK 9
.Os .Os
.Sh NAME .Sh NAME
@ -43,6 +43,8 @@
.Fn disk_gone "struct disk *disk" .Fn disk_gone "struct disk *disk"
.Ft void .Ft void
.Fn disk_destroy "struct disk *disk" .Fn disk_destroy "struct disk *disk"
.Ft int
.Fn disk_resize "struct disk *disk" "int flags"
.Sh DESCRIPTION .Sh DESCRIPTION
The disk storage API permits kernel device drivers providing access to The disk storage API permits kernel device drivers providing access to
disk-like storage devices to advertise the device to other kernel disk-like storage devices to advertise the device to other kernel
@ -67,6 +69,13 @@ function,
fill in the fields and call fill in the fields and call
.Fn disk_create .Fn disk_create
when the device is ready to service requests. when the device is ready to service requests.
.Fn disk_resize
can be called by the driver after modifying
.Va d_mediasize
to notify GEOM about the disk capacity change.
The
.Fa flags
field should be set to either M_WAITOK, or M_NOWAIT.
.Fn disk_gone .Fn disk_gone
orphans all of the providers associated with the drive, setting an error orphans all of the providers associated with the drive, setting an error
condition of ENXIO in each one. condition of ENXIO in each one.