From owner-man-jp-reviewer@jp.FreeBSD.org Fri Nov 21 00:00:30 2003
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id hAKF0UC40448;
	Fri, 21 Nov 2003 00:00:30 +0900 (JST)
	(envelope-from owner-man-jp-reviewer@jp.FreeBSD.org)
Received: from goro.asahi-net.or.jp (goro.asahi-net.or.jp [202.224.39.40])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with ESMTP/inet id hAKF0UM40443
	for <man-jp-reviewer@jp.FreeBSD.org>; Fri, 21 Nov 2003 00:00:30 +0900 (JST)
	(envelope-from yr6a-ikuc@asahi-net.or.jp)
Received: from asahi-net.or.jp (e144248.ppp.asahi-net.or.jp [211.13.144.248])
	by goro.asahi-net.or.jp (8.11.7/3.7W) with ESMTP id hAKF0Ru85514
	for <man-jp-reviewer@jp.FreeBSD.org>; Fri, 21 Nov 2003 00:00:28 +0900 (JST)
Message-ID: <3FBCD70A.40002@asahi-net.or.jp>
From: Akira Ikeuchi <yr6a-ikuc@asahi-net.or.jp>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.5) Gecko/20031013 Thunderbird/0.3
X-Accept-Language: ja, en-us, en
MIME-Version: 1.0
To: man-jp-reviewer@jp.FreeBSD.org
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
Reply-To: man-jp-reviewer@jp.FreeBSD.org
Precedence: list
Date: Fri, 21 Nov 2003 00:00:26 +0900
X-Sequence: man-jp-reviewer 4522
Subject: [man-jp-reviewer 4522] (man9) namei.9
Sender: owner-man-jp-reviewer@jp.FreeBSD.org
X-Originator: yr6a-ikuc@asahi-net.or.jp
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+031103

$BCSFb$G$9!#(B

namei.9 $B$N=iLu$G$9!#(B
$B%A%'%C%/$*4j$$$7$^$9!#(B


--- original/namei.9	Mon Oct 27 16:35:39 2003
+++ japanese/namei.9	Thu Nov 20 22:32:58 2003
@@ -1,6 +1,7 @@
+.\" -*- nroff -*-
 .\"
 .\" Copyright (c) 1998, 1999 Eivind Eklund
-.\" Copyright (c) 2003 Hiten M. Pandya
+.\" Copyright (c) 2003, Hiten M. Pandya
 .\"
 .\" All rights reserved.
 .\"
@@ -30,17 +31,17 @@
 .\" If you integrate this manpage in another OS, I'd appreciate a note
 .\"	- eivind@FreeBSD.org
 .\"
-.\" $FreeBSD: /repoman/r/ncvs/src/share/man/man9/namei.9,v 1.25 2003/06/02 15:02:06 ru Exp $
+.\" $FreeBSD: src/share/man/man9/namei.9,v 1.25 2003/06/02 15:02:06 ru Exp $
 .\"
 .Dd May 27, 2003
 .Os
 .Dt NAMEI 9
-.Sh NAME
+.Sh $BL>>N(B
 .Nm namei ,
 .Nm NDINIT ,
-.Nm NDFREE
-.Nd pathname translation and lookup operations
-.Sh SYNOPSIS
+.Nm NDFREE
+.Nd $B%Q%9L>$NK]Lu$*$h$S8!:wA`:n(B
+.Sh $B=q<0(B
 .In sys/param.h
 .In sys/proc.h
 .In sys/namei.h
@@ -53,267 +54,259 @@
 .Fc
 .Ft void
 .Fn NDFREE "struct nameidata *ndp" "const uint flags"
-.Sh DESCRIPTION
-The
+.Sh $B2r@b(B
 .Nm
-facility allows the client to perform pathname translation and lookup
-operations.
-The
+$B$N;EAH$_$O%/%i%$%"%s%H$,%Q%9L>$NK]Lu$*$h$S8!:w$NA`:n$r2DG=$K$7$^$9!#(B
 .Nm
-functions will increment the reference count for the vnode in question.
-The reference count has to be decremented after use of the vnode, by
-using either
-.Xr vrele 9
-or
-.Xr vput 9 ,
-depending on whether the
+$B4X?t$OLdBj$H$J$C$F$$$k(B vnode $B$N$?$a$N;2>H%+%&%s%H$r%$%s%/%j%a%s%H$7$^$9!#(B
+$B$=$N;2>H%+%&%s%H$O!"(B
 .Dv LOCKLEAF
-flag was specified or not.
+$B%U%i%0$,;XDj$5$l$?$+$I$&$+$K0MB8$7$F!"(B
+.Xr vrele 9
+$B$^$?$O(B
+.Xr vput 9
+$B$N$I$A$i$+$r;HMQ$7$F!"$=$N(B vnode $B$N;HMQ8e$K%G%/%j%a%s%H$5$l$J$1$l$P$J$j$^$;$s!#(B
 .Pp
-The
 .Fn NDINIT
-function is used to initialize
+$B4X?t$O(B
 .Nm
-components.
-It takes the following arguments:
+$B$NMWAG$r=i4|2=$9$k$?$a$K;HMQ$5$l$^$9!#(B
+$B$3$l$O0J2<$N0z?t$r<h$j$^$9!#(B
 .Bl -tag -width ".Fa segflg"
 .It Fa ndp
-The
+$B=i4|2=$5$l$k$Y$-(B
 .Vt "struct nameidata"
-to initialize.
+$B9=B$BN$G$9!#(B
 .It Fa op
-The operation which
 .Fn namei
-will perform.
-The following operations are valid:
+$B$,<B9T$9$kA`:n$G$9!#(B
 .Dv LOOKUP , CREATE , DELETE ,
-and
-.Dv RENAME .
-The latter three are just setup for those
-effects; just calling
+$B$*$h$S(B
+.Dv RENAME
+$B$NA`:n$,M-8z$G$9!#(B
+$B8e<T(B 3 $B$D$O$3$l$i$N8z2L$N$?$a$N%;%C%H%"%C%W$@$1$G$9!#(B
 .Fn namei
-will not result in
+$B$N8F$S=P$7$@$1$G$O(B
 .Fn VOP_RENAME
-being called.
+$B$,8F$S=P$5$l$?$h$&$J7k2L$K$O$J$j$^$;$s!#(B
 .It Fa flags
-Operation flags.
-Several of these can be effective at the same time.
+$BA`:n%U%i%0$G$9!#(B
+$B$3$l$i$NFb$N4v$D$+$O!"F1;~$KM-8z2=$5$l$k$3$H$,2DG=$G$9!#(B
 .It Fa segflg
-UIO segment indicator.
-This indicates if the name of the object is in userspace
+UIO $B%;%0%a%s%H$N%$%s%8%1!<%?$G$9!#(B
+$B$3$l$O%*%V%8%'%/%H$NL>A0$,%f!<%66u4V(B
 .Pq Dv UIO_USERSPACE
-or in the kernel address space
-.Pq Dv UIO_SYSSPACE .
+$B$K$"$k$N$+%+!<%M%k%"%I%l%96u4V(B
+.Pq Dv UIO_SYSSPACE
+$B$K$"$k$N$+$r<($7$^$9!#(B
 .It Fa namep
-Pointer to the component's pathname buffer
-(the file or directory name that will be looked up).
+$B%Q%9L>$N%P%C%U%!(B ($B8!:w$5$l$k%U%!%$%kL>$^$?$O%G%#%l%/%H%jL>(B) $B$N9=@.MWAG(B
+$B$X$N%]%$%s%?$G$9!#(B
 .It Fa td
-The thread context to use for
 .Nm
-operations and locks.
+$B$NA`:n$*$h$S%m%C%/$N$?$a$K;HMQ$5$l$k%9%l%C%I%3%s%F%-%9%H$G$9!#(B
 .El
-.Sh NAMEI OPERATION FLAGS
-The
+.Sh NAMEI $BA`:n%U%i%0(B
 .Fn namei
-function takes the following set of
-.Dq "operation flags"
-that influence its operation:
+$B$OA`:n$,$I$N$h$&$J1F6A$r5Z$\$9$+$H$$$&!"0J2<$N(B
+.Dq $BA`:n%U%i%0(B
+$B$N%;%C%H$r<h$j$^$9!#(B
 .Bl -tag -width ".Dv WANTPARENT"
 .It Dv LOCKLEAF
-Lock vnode on return.
-This is a full lock of the vnode; the
+$BLa$k$H$-$K(B vnode $B$r%m%C%/$7$^$9!#(B
+$B$3$l$O$=$N(B vnode $B$N@5<0$J%m%C%/$G!"%m%C%/$r2rJ|$9$k$?$a$K$O(B
 .Xr VOP_UNLOCK 9
-should be used
-to release the lock (or
-.Xr vput 9
-which is equivalent to calling
+$B$r;HMQ$9$k$Y$-$G$9!#(B
+($B$^$?$O(B
+.Xr vrele 9
+$B$,8e$KB3$/(B
 .Xr VOP_UNLOCK 9
-followed by
-.Xr vrele 9 ,
-all in one).
+$B$N8F$S=P$7$r0l=o$K9T$&$3$H$HEy2A$G$"$k(B
+.Xr vput 9
+$B$r;HMQ$9$k$Y$-$G$9!#(B)
 .It Dv LOCKPARENT
-This flag lets the
+$B$3$N%U%i%0$O(B
+.Va ni_vdp
+$B$H(B
+.Va ni_vp
+$B$,0lCW$7$J$$>l9g$K$O!"(B
 .Fn namei
-function return the parent (directory) vnode,
+$B4X?t$K?F(B ($B%G%#%l%/%H%j(B) $B$N(B vnode $B$G$"$k(B
 .Va ni_dvp
-in locked state, unless it is identical to
-.Va ni_vp ,
-in which case
+$B$,%m%C%/$5$l$?>uBV$GJV$9$h$&$K$7$^$9!#(B
+$B$3$N>l9g!"$3$l<+BN$G$O(B
 .Va ni_dvp
-is not locked per se (but may be locked due to
-.Dv LOCKLEAF ) .
-If a lock is enforced, it should be released using
+$B$O%m%C%/$5$l$^$;$s(B ($B$,!"(B
+.Dv LOCKLEAF
+$B$N$?$a%m%C%/$5$l$k$+$b$7$l$^$;$s(B)$B!#(B
+$B%m%C%/$,<B;\$5$l$?>l9g$K$O!"(B
 .Xr vput 9
-or
+$B$^$?$O(B
 .Xr VOP_UNLOCK 9
-and
-.Xr vrele 9 .
+$B$H(B
+.Xr vrele 9
+$B$r;HMQ$7$F%m%C%/$,2rJ|$5$l$k$Y$-$G$9!#(B
 .It Dv WANTPARENT
-This flag allows the
+$B$3$N%U%i%0$O(B
 .Fn namei
-function to return the parent (directory) vnode in an unlocked state.
-The parent vnode must be released separately by using
-.Xr vrele 9 .
+$B4X?t$,?F(B ($B%G%#%l%/%H%j(B) $B$N(B vnode $B$r%m%C%/$5$l$F$$$J$$>uBV$G!"(B
+$BJV$9$h$&$K$7$^$9!#(B
+$B$=$N?F$N(B vnode $B$O(B
+.Xr vrele 9
+$B$r;HMQ$7$F8DJL$K2rJ|$5$l$J$1$l$P$J$j$^$;$s!#(B
 .It Dv NOCACHE
-Avoid
+$BL>A0%-%c%C%7%e$N%(%s%H%j$,4{$KB8:_$7$F$$$J$$>l9g$K$O!"(B
 .Fn namei
-creating this entry in the namecache if it is not
-already present.
-Normally,
+$B$,L>A0%-%c%C%7%e$K$3$N%(%s%H%j$r:n@.$9$k$3$H$r2sHr$7$^$9!#(B
+$BDL>o!"$=$3$K%(%s%H%j$,L$$@$J$$>l9g$K$O!"(B
 .Fn namei
-will add entries to the name cache
-if they are not already there.
+$B$OL>A0%-%c%C%7%e$K%(%s%H%j$rDI2C$7$^$9!#(B
 .It Dv FOLLOW
-With this flag,
+$B$3$N%U%i%0$,$"$k$H!"(B
 .Fn namei
-will follow the symbolic link if the last part
-of the path supplied is a symbolic link (i.e., it will return a vnode
-for whatever the link points at, instead for the link itself).
+$B$OM?$($i$l$?%Q%9L>$N:G8e$NItJ,$,%7%s%\%j%C%/%j%s%/$G$"$l$P!"(B
+$B%7%s%\%j%C%/%j%s%/$rC)$j$^$9(B ($B$9$J$o$A!"%j%s%/$=$l<+BN$N(B vnode $B$NBe$o$j$K!"(B
+$B%j%s%/$,;X$7$F$$$k$H$3$m$N(B vnode $B$,JV$5$l$^$9(B)$B!#(B
 .It Dv NOOBJ
-Do not call
+$B$?$H$((B VM $B%5%]!<%H$N$?$a$NMW5a$5$l$?4p=`$rK~$?$7$F$$$k$H$7$F$b!"(B
+$BJV$5$l$k(B vnode $B$N$?$a$K(B
 .Fn vfs_object_create
-for the returned vnode, even though it meets required criteria for VM support.
+$B$r8F$S=P$7$^$;$s!#(B
 .It Dv NOFOLLOW
-Do not follow symbolic links (pseudo).
-This flag is not looked for by the actual code, which looks for
-.Dv FOLLOW .
+$B%7%s%\%j%C%/%j%s%/$rC)$j$^$;$s(B ($B5<;w%U%i%0(B)$B!#(B
+$B$3$N%U%i%0$O<B:]$N%3!<%I$K$h$C$F4|BT$5$l$^$;$s!"%3!<%I$O(B
+.Dv FOLLOW
+$B$r4|BT$7$^$9!#(B
 .Dv NOFOLLOW
-is used to indicate to the source code reader that symlinks
-are intentionally not followed.
+$B$O%=!<%9%3!<%I$rFI$`?M$K%7%s%\%j%C%/%j%s%/$,C)$i$l$J$$$3$H$r8N0U$K(B
+$B<($9$?$a$K;HMQ$5$l$^$9!#(B
 .It Dv SAVENAME
-Do not free the pathname buffer at the end of the
+$B8F=P$7B&$,$=$N%Q%9L>$N%P%C%U%!$K%"%/%;%9$9$k$+$b$7$l$J$$;~$N$?$a$K!"(B
 .Fn namei
-invocation; instead, free it later in
+$B$N<B9T$N:G8e$G!"%Q%9L>$N%P%C%U%!$r2rJ|$7$^$;$s!#(B
+$BBe$o$j$K8e$G(B
 .Fn NDFREE
-so that the caller may access the pathname buffer.
-See below for details.
+$B$G$=$NL>A0%P%C%U%!$r2rJ|$7$^$9!#(B
+$B>\:Y$O2<5-$r;2>H$7$F$/$@$5$$!#(B
 .It Dv SAVESTART
-Retain an additional reference to the parent directory; do not free
-the pathname buffer.
-See below for details.
+$B?F%G%#%l%/%H%j$X$NDI2C$N;2>H$r0];}$7$^$9!#(B
+$B%Q%9L>$N%P%C%U%!$r2rJ|$7$^$;$s!#(B
+$B>\:Y$O2<5-$r;2>H$7$F$/$@$5$$!#(B
 .El
-.Sh ALLOCATED ELEMENTS
-The
+.Sh $B3dEv$F$i$l$?MWAG(B
 .Vt nameidata
-structure is composed of the following fields:
+$B9=B$BN$O0J2<$N%U%#!<%k%I$G9=@.$5$l$^$9!#(B
 .Bl -tag -width ".Va ni_cnd.cn_pnbuf"
 .It Va ni_startdir
-In the normal case, this is either the current directory or the root.
-It is the current directory if the name passed in does not start with
+$BDL>o$N>l9g!"$3$l$O8=:_$N%G%#%l%/%H%j$^$?$O%k!<%H%G%#%l%/%H%j$N$I$A$i$+$G$9!#(B
+$BEO$5$l$?L>A0$,(B
 .Ql /
-and we have not gone through any symlinks with an absolute path, and
-the root otherwise.
+$B$G;O$^$C$F$*$i$:!"@dBP%Q%9$N%7%s%\%j%C%/%j%s%/$r(B
+$BDL$jH4$1$F$$$J$$>l9g$K$O8=:_$N%G%#%l%/%H%j$G!"$=$&$G$J$$>l9g$K$O%k!<%H$G$9!#(B
 .Pp
-In this case, it is only used by
-.Fn lookup ,
-and should not be
-considered valid after a call to
-.Fn namei .
-If
+$B$3$N>l9g!"(B
+.Fn lookup
+$B$K$h$C$F$N$_;HMQ$5$l!"(B
+.Fn namei
+$B$X$N8F=P$7$N8e$GMxMQ2DG=$@$H$_$J$5$l$k$Y$-$G$O$"$j$^$;$s!#(B
 .Dv SAVESTART
-is set, this is set to the same as
-.Va ni_dvp ,
-with an extra
-.Xr vref 9 .
-To block
+$B$,@_Dj$5$l$F$$$k>l9g$K$O!"DI2C$N(B
+.Xr vref 9
+$B$rH<$J$C$?(B
+.Va ni_dvp
+$B$HF1MM$K@_Dj$5$l$^$9!#(B
+.Va ni_startdir
+$B$N2rJ|$+$i(B
 .Fn NDFREE
-from releasing
-.Va ni_startdir ,
-the
+$B$r%V%m%C%/$9$k$?$a$K!"(B
 .Dv NDF_NO_STARTDIR_RELE
-can be set.
+$B$r@_Dj$9$k$3$H$,2DG=$G$9!#(B
 .It Va ni_dvp
-Vnode pointer to directory of the object on which lookup is performed.
-This is available on successful return if
+$B8!:w$,<B9T$5$l$F$$$k%*%V%8%'%/%H$N%G%#%l%/%H%j$X$N%]%$%s%?$G$9!#(B
 .Dv LOCKPARENT
-or
+$B$^$?$O(B
 .Dv WANTPARENT
-is set.
-It is locked if
+$B$,@_Dj$5$l$F$$$k>l9g$K!"@.8y$7$FLa$C$?;~$KMxMQ2DG=$G$9!#(B
 .Dv LOCKPARENT
-is set.
-Freeing this in
-.Fn NDFREE
-can be inhibited by
+$B$,@_Dj$5$l$F$$$k>l9g$K$O%m%C%/$5$l$^$9!#(B
 .Dv NDF_NO_DVP_RELE , NDF_NO_DVP_PUT ,
-or
+$B$^$?$O(B
 .Dv NDF_NO_DVP_UNLOCK
-(with the obvious effects).
+$B$K$h$C$F!"(B($BL@$i$+$J8z2L$rH<$C$F(B)
+.Fn NDFREE
+$BFb$N(B
+.Va ni_dvp
+$B$N2rJ|$rM^@)$9$k$3$H$,2DG=$G$9!#(B
 .It Va ni_vp
-Vnode pointer to the resulting object,
+$B%*%V%8%'%/%H$,JV$5$l$k$?$a$N(B vnode $B%]%$%s%?$G!"$=$&$G$J$1$l$P(B
 .Dv NULL
-otherwise.
-The
+$B$G$9!#(B
+$B$3$N(B vnode $B$N(B
 .Va v_usecount
-field of this vnode is incremented.
-If
+$B%U%#!<%k%I$,%$%s%/%j%a%s%H$5$l$^$9!#(B
 .Dv LOCKLEAF
-is set, it is also locked.
+$B$,@_Dj$5$l$F$$$k>l9g$K$O!"%m%C%/$b$5$l$^$9!#(B
 .Pp
-Freeing this in
-.Fn NDFREE
-can be inhibited by
-.Dv NDF_NO_VP_RELE , NDF_NO_VP_PUT ,
-or
+.Dv NDF_NO_VP_RELE , NDF_NO_VP_PUT
+$B$^$?$O(B
 .Dv NDF_NO_VP_UNLOCK
-(with the obvious effects).
+$B$K$h$C$F!"(B($BL@$i$+$J8z2L$rH<$C$F(B)
+.Fn NDFREE
+$BFb$N(B
+.Va ni_vp
+$B$N2rJ|$rM^@)$9$k$3$H$,2DG=$G$9!#(B
 .It Va ni_cnd.cn_pnbuf
-The pathname buffer contains the location of the file or directory
-that will be used by the
 .Nm
-operations.
-It is managed by the
+$BA`:n$K$h$C$F;HMQ$5$l$k!"(B
+$B%U%!%$%k$^$?$O%G%#%l%/%H%j$N0LCV$,F~$C$F$$$k%Q%9L>$N%P%C%U%!$G$9!#(B
+$B$3$l$O(B
 .Xr uma 9
-zone allocation interface.
-If the
+$B%>!<%s3d$jEv$F%$%s%?%U%'!<%9$K$h$C$F4IM}$5$l$^$9!#(B
 .Dv SAVESTART
-or
+$B$^$?$O(B
 .Dv SAVENAME
-flag is set, then the pathname buffer is available
-after calling the
+$B%U%i%0$,@_Dj$5$l$F$$$k>l9g$K$O!"$=$N%Q%9L>$N%P%C%U%!$O(B
 .Fn namei
-function.
+$B4X?t$N8F$S=P$78e$bMxMQ2DG=$G$9!#(B
 .Pp
-To only deallocate resources used by the pathname buffer,
-.Va ni_cnd.cn_pnbuf ,
-then
+$B%Q%9L>$N%P%C%U%!(B
+.Va ni_cnd.cn_pnbuf
+$B$K$h$C$F;HMQ$5$l$F$$$k%j%=!<%9$N$_$r2rJ|$9$k$?$a$K!"(B
 .Dv NDF_ONLY_PNBUF
-flag can be passed to the
+$B%U%i%0$r(B
 .Fn NDFREE
-function.
-To keep the pathname buffer intact,
-the
+$B4X?t$KEO$9$3$H$,2DG=$G$9!#(B
+$B%Q%9L>$N%P%C%U%!$r$=$N$^$^$GJ];}$9$k$?$a$K!"(B
 .Dv ND_NO_FREE_PNBUF
-flag can be passed to the
+$B%U%i%0$r(B
 .Fn NDFREE
-function.
+$B4X?t$KEO$9$3$H$,2DG=$G$9!#(B
 .El
-.Sh FILES
+.Sh $B4XO"%U%!%$%k(B
 .Bl -tag
 .It Pa src/sys/kern/vfs_lookup.c
 .El
-.Sh SEE ALSO
+.Sh $B4XO"9`L\(B
 .Xr uio 9 ,
 .Xr uma 9 ,
 .Xr VFS 9 ,
 .Xr vnode 9 ,
 .Xr vput 9 ,
 .Xr vref 9
-.Sh AUTHORS
+.Sh $B:n<T(B
 .An -nosplit
-This manual page was written by
+$B$3$N%^%K%e%"%k%Z!<%8$O(B
 .An Eivind Eklund Aq eivind@FreeBSD.org
-and later significantly revised by
-.An Hiten M. Pandya Aq hmp@FreeBSD.org .
-.Sh BUGS
-The
+$B$,=q$-!"$=$N8e$G(B
+.An Hiten M. Pandya Aq hmp@FreeBSD.org
+$B$,BgI}$K=$@5$7$^$7$?!#(B
+.Sh $B%P%0(B
 .Dv LOCKPARENT
-flag does not always result in the parent vnode being locked.
-This results in complications when the
+$B%U%i%0$O>o$K?F$N(B vnode $B$,%m%C%/$5$l$k7k2L$K$J$k$H$O8B$j$^$;$s!#(B
 .Dv LOCKPARENT
-is used.
-In order to solve this for the cases where both
+$B$,;HMQ$5$l$k;~$K$O!"J#;(2=$9$k7k2L$H$J$j$^$9!#(B
 .Dv LOCKPARENT
-and
+$B$*$h$S(B
 .Dv LOCKLEAF
-are used, it is necessary to resort to recursive locking.
+$B$NN>J}$,;HMQ$5$l$k>l9g$N$3$NLdBj$N2r7h$N$?$a$K!"(B
+$B:F5"E*%m%C%/$KMj$k$3$H$,I,MW$K$J$j$^$9!#(B


