From owner-svn-src-head@FreeBSD.ORG Tue Oct 30 13:05:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 79500118; Tue, 30 Oct 2012 13:05:51 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 609E48FC16; Tue, 30 Oct 2012 13:05:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9UD5pTk095950; Tue, 30 Oct 2012 13:05:51 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9UD5pui095947; Tue, 30 Oct 2012 13:05:51 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201210301305.q9UD5pui095947@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 30 Oct 2012 13:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242359 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 13:05:51 -0000 Author: trasz Date: Tue Oct 30 13:05:50 2012 New Revision: 242359 URL: http://svn.freebsd.org/changeset/base/242359 Log: Document disk_resize(9). Modified: head/share/man/man9/Makefile head/share/man/man9/disk.9 Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Oct 30 12:52:41 2012 (r242358) +++ head/share/man/man9/Makefile Tue Oct 30 13:05:50 2012 (r242359) @@ -614,7 +614,8 @@ MLINKS+=devstat.9 devicestat.9 \ MLINKS+=disk.9 disk_alloc.9 \ disk.9 disk_create.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 \ domain.9 domain_add.9 \ domain.9 pfctlinput.9 \ Modified: head/share/man/man9/disk.9 ============================================================================== --- head/share/man/man9/disk.9 Tue Oct 30 12:52:41 2012 (r242358) +++ head/share/man/man9/disk.9 Tue Oct 30 13:05:50 2012 (r242359) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 18, 2004 +.Dd October 30, 2012 .Dt DISK 9 .Os .Sh NAME @@ -43,6 +43,8 @@ .Fn disk_gone "struct disk *disk" .Ft void .Fn disk_destroy "struct disk *disk" +.Ft int +.Fn disk_resize "struct disk *disk" "int flags" .Sh DESCRIPTION The disk storage API permits kernel device drivers providing access to disk-like storage devices to advertise the device to other kernel @@ -67,6 +69,13 @@ function, fill in the fields and call .Fn disk_create 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 orphans all of the providers associated with the drive, setting an error condition of ENXIO in each one.