NetBSD/lib/libpuffs/puffs_node.3
pooka 809ae5f803 Bring the documentation slightly more into sync with the current
reality.  It's still really a far cry from proper documentation,
though.
2007-01-19 21:10:55 +00:00

80 lines
2.9 KiB
Groff

.\" $NetBSD: puffs_node.3,v 1.1 2007/01/19 21:10:55 pooka Exp $
.\"
.\" Copyright (c) 2007 Antti Kantee. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd January 19, 2007
.Dt PUFFS_NODE 3
.Os
.Sh NAME
.Nm puffs_node
.Nd puffs node routines
.Sh LIBRARY
.Lb libpuffs
.Sh SYNOPSIS
.In puffs.h
.Ft struct puffs_node *
.Fn puffs_pn_new "struct puffs_usermount *pu" "void *priv"
.Ft void
.Fn puffs_pn_put "struct puffs_node *pn"
.Ft void *
.Fo puffs_nodewalk_fn
.Fa "struct puffs_usermount *pu" "struct puffs_node *pn" "void *arg"
.Fc
.Ft void *
.Fo puffs_pn_nodewalk
.Fa "struct puffs_usermount *pu" "puffs_nodewalk_fn" "void *arg"
.Fc
.Sh DESCRIPTION
.Em IMPORTANT NOTE!
This document describes interfaces which are not yet guaranteed to be
stable.
In case you update your system sources, please recompile everything
and fix complation errors.
If your sources are out-of-sync, incorrect operation may result.
The interfaces in this document will most likely be hugely simplified
in later versions or made transparent to the implementation.
.Pp
It should especially be noted, that it is yet completely unsure, how
much of the internals contents of
.Vt struct puffs_node
will be exposed to file systems in the end.
.Pp
Nodes are allocated and released by using
.Fn puffs_pn_new
and
.Fn puffs_pn_put ,
respectively.
The argument
.Fa priv
can be used to store file system specific information.
.Pp
The list of all nodes in a file system can be traversed by calling
.Fn puffs_pn_nodewalk .
This is useful for example in handling the
.Fn puffs_fs_sync
callback, when cached data for every node should be flushed to stable
storage.
.Sh SEE ALSO
.Xr puffs 3