Add section 9 man pages for:

vfs_write_suspend, vfs_write_resume, vn_start_write and vn_finished_write.
This commit is contained in:
hannken 2003-10-21 22:01:24 +00:00
parent 861856caa0
commit 9dec5da8e8
4 changed files with 83 additions and 10 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.634 2003/10/18 09:10:16 wiz Exp $
# $NetBSD: mi,v 1.635 2003/10/21 22:01:24 hannken Exp $
./usr/bin/addr2line comp-debug-bin
./usr/bin/ar comp-util-bin
./usr/bin/as comp-util-bin
@ -7936,6 +7936,8 @@
./usr/share/man/man9/vfs_sysctl.9 comp-sys-man
./usr/share/man/man9/vfs_unbusy.9 comp-sys-man
./usr/share/man/man9/vfs_unmountall.9 comp-sys-man
./usr/share/man/man9/vfs_write_resume.9 comp-sys-man
./usr/share/man/man9/vfs_write_suspend.9 comp-sys-man
./usr/share/man/man9/vfsops.9 comp-sys-man
./usr/share/man/man9/vfssubr.9 comp-sys-man
./usr/share/man/man9/vget.9 comp-sys-man
@ -7963,6 +7965,7 @@
./usr/share/man/man9/vn_closefile.9 comp-sys-man
./usr/share/man/man9/vn_default_error.9 comp-sys-man
./usr/share/man/man9/vn_fcntl.9 comp-sys-man
./usr/share/man/man9/vn_finished_write.9 comp-sys-man
./usr/share/man/man9/vn_ioctl.9 comp-sys-man
./usr/share/man/man9/vn_isunder.9 comp-sys-man
./usr/share/man/man9/vn_lock.9 comp-sys-man
@ -7974,6 +7977,7 @@
./usr/share/man/man9/vn_read.9 comp-sys-man
./usr/share/man/man9/vn_restorerecurse.9 comp-sys-man
./usr/share/man/man9/vn_setrecurse.9 comp-sys-man
./usr/share/man/man9/vn_start_write.9 comp-sys-man
./usr/share/man/man9/vn_stat.9 comp-sys-man
./usr/share/man/man9/vn_statfile.9 comp-sys-man
./usr/share/man/man9/vn_write.9 comp-sys-man

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.148 2003/10/13 19:52:58 bouyer Exp $
# $NetBSD: Makefile,v 1.149 2003/10/21 22:01:24 hannken Exp $
# Makefile for section 9 (kernel function and variable) manual pages.
@ -504,7 +504,9 @@ MLINKS+=vfssubr.9 vfs_getnewfsid.9 \
vfssubr.9 vfs_detach.9 \
vfssubr.9 vfs_reinit.9 \
vfssubr.9 vfs_getopsbyname.9 \
vfssubr.9 vfs_sysctl.9
vfssubr.9 vfs_sysctl.9 \
vfssubr.9 vfs_write_suspend.9 \
vfssubr.9 vfs_write_resume.9
MLINKS+=vnode.9 vcount.9 \
vnode.9 vref.9 \
vnode.9 VREF.9 \
@ -599,7 +601,9 @@ MLINKS+=vnsubr.9 vn_bwrite.9 \
vnsubr.9 vn_setrecurse.9 \
vnsubr.9 vn_stat.9 \
vnsubr.9 vn_open.9 \
vnsubr.9 vn_writechk.9
vnsubr.9 vn_writechk.9 \
vnsubr.9 vn_start_write.9 \
vnsubr.9 vn_finished_write.9
MLINKS+=wsdisplay.9 wsdisplay_switchtoconsole.9 \
wsdisplay.9 wsdisplay_cnattach.9 \
wsdisplay.9 wsdisplaydevprint.9 \

View File

@ -1,4 +1,4 @@
.\" $NetBSD: vfssubr.9,v 1.3 2003/04/16 13:35:35 wiz Exp $
.\" $NetBSD: vfssubr.9,v 1.4 2003/10/21 22:01:24 hannken Exp $
.\"
.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -56,7 +56,9 @@
.Nm vfs_detach ,
.Nm vfs_reinit ,
.Nm vfs_getopsbyname ,
.Nm vfs_sysctl
.Nm vfs_sysctl ,
.Nm vfs_write_suspend ,
.Nm vfs_write_resume
.Nd high-level interface to kernel file system interface
.Sh SYNOPSIS
.In sys/param.h
@ -104,6 +106,10 @@
.Ft int
.Fn vfs_sysctl "int *name" "u_int namelen" "void *oldp" "size_t *oldlenp" \
"void *newp" "size_t newlen" "struct proc *p"
.Ft int
.Fn vfs_write_suspend "struct mount *mp"
.Ft void
.Fn vfs_write_resume "struct mount *mp"
.Sh DESCRIPTION
The high-level functions described in this page are the interface to
the kernel file system interface (VFS).
@ -190,6 +196,13 @@ if file system isn't present in the kernel.
.It Fn vfs_sysctl "name" "namelen" "oldp" "oldlenp" "newp" "newlen" \
"struct proc *p"
Retrieve file system-specific information for the sysctl(3) function.
.It Fn vfs_write_suspend "mp"
Request a mounted file system to suspend write operations.
All new write operations to the file system are stopped.
After all write operations in progress have completed, the
file system is synced to disk and the function returns.
.It Fn vfs_write_resume "mp"
Request a mounted file system to resume write operations.
.El
.Sh CODE REFERENCES
This section describes places within the

View File

@ -1,4 +1,4 @@
.\" $NetBSD: vnsubr.9,v 1.16 2003/06/30 19:12:34 wiz Exp $
.\" $NetBSD: vnsubr.9,v 1.17 2003/10/21 22:01:24 hannken Exp $
.\"
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -51,7 +51,9 @@
.Nm vn_setrecurse ,
.Nm vn_open ,
.Nm vn_stat ,
.Nm vn_writechk
.Nm vn_writechk ,
.Nm vn_start_write ,
.Nm vn_finished_write
.Nd high-level convenience functions for vnode operations
.Sh SYNOPSIS
.In sys/param.h
@ -89,6 +91,10 @@
.Fn vn_stat "struct vnode *vp" "struct stat *sb" "struct proc *p"
.Ft int
.Fn vn_writechk "struct vnode *vp"
.Ft int
.Fn vn_start_write "struct vnode *vp" "struct mount **mpp" "int flags"
.Ft void
.Fn vn_finished_write "struct mount *mp" "int flags"
.Sh DESCRIPTION
The high-level functions described in this page are convenience
functions for simplified access to the vnode operations described in
@ -253,6 +259,50 @@ Common code to check for write permission on the vnode
A vnode is read-only if it is in use as a process's text image.
If the vnode is read-only ETEXTBSY is returned, otherwise zero is
returned to indicate that the vnode can be written to.
.It Fn vn_start_write "vp" "mpp" "flags"
Prepare to start a file system write operation.
If the operation is permitted, bump the count of operations in progress and
proceed.
If a suspend request is in progress (see
.Xr vfs_write_suspend 9 ) ,
wait until the suspension is over
and proceed.
If
.Fa vp
is not
.Dv NULL ,
its mount point is assigned to
.Fa mpp .
If the
.Dv V_WAIT
flag is set,
.Fn vn_start_write
waits until the suspension is over.
Otherwise it returns
.Er EWOULDBLOCK .
If the
.Dv V_PCATCH
flag is set,
.Dv PCATCH
gets added to the
.Fn tsleep
flags.
If the
.Dv V_SLEEPONLY
flag is set, the operations count is not bumped.
If the
.Dv V_LOWER
flag is set, no further vnodes must be locked.
If it is not set, no vnodes must be already locked.
If the operation is permitted zero is returned, otherwise
.Er EWOULDBLOCK
is returned.
.It Fn vn_finished_write "mp" "flags"
A file system write operation has finished.
Adjust the count of operations in progress and return.
Only the
.Dv V_LOWER
flag is valid.
.El
.Sh ERRORS
.Bl -tag -width Er
@ -275,8 +325,10 @@ framework can be found.
All pathnames are relative to
.Pa /usr/src .
.Pp
The high-level convenience functions are implemented within the file
.Pa sys/kern/vfs_vnops.c .
The high-level convenience functions are implemented within the files
.Pa sys/kern/vfs_vnops.c
and
.Pa sys/sys/vnode.h .
.Sh SEE ALSO
.Xr file 9 ,
.Xr intro 9 ,