Deleted Added
full compact
vfs_getvfs.9 (87252) vfs_getvfs.9 (87857)
1.\"
2.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice(s), this list of conditions and the following disclaimer as

--- 10 unchanged lines hidden (view full) ---

19.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
25.\" DAMAGE.
26.\"
1.\"
2.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice(s), this list of conditions and the following disclaimer as

--- 10 unchanged lines hidden (view full) ---

19.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
25.\" DAMAGE.
26.\"
27.\" $FreeBSD: head/share/man/man9/vfs_getvfs.9 87252 2001-12-03 00:25:04Z alfred $
27.\" $FreeBSD: head/share/man/man9/vfs_getvfs.9 87857 2001-12-14 09:11:13Z ru $
28.\"
29.Dd November 21, 2001
30.Dt VFS_GETVFS 9
31.Os
32.Sh NAME
33.Nm vfs_getvfs
28.\"
29.Dd November 21, 2001
30.Dt VFS_GETVFS 9
31.Os
32.Sh NAME
33.Nm vfs_getvfs
34.Nd "returns a mount point given its fsid"
34.Nd "returns a mount point given its filesystem identifier"
35.Sh SYNOPSIS
36.In sys/param.h
37.In sys/mount.h
35.Sh SYNOPSIS
36.In sys/param.h
37.In sys/mount.h
38.Ft struct mount *
38.Ft "struct mount *"
39.Fn vfs_getvfs "fsid_t *fsid"
40.Sh DESCRIPTION
41The
42.Fn vfs_getvfs
43function returns the mount point structure for a filesystem given its filesystem
39.Fn vfs_getvfs "fsid_t *fsid"
40.Sh DESCRIPTION
41The
42.Fn vfs_getvfs
43function returns the mount point structure for a filesystem given its filesystem
44identifier. The filesystem id should have been allocated by calling
45.Fn vfs_getnewfsid ;
44identifier.
45The filesystem ID should have been allocated by calling
46.Xr vfs_getnewfsid 9 ;
46otherwise, it will not be found.
47.Pp
48A major user of
49.Fn vfs_getvfs
47otherwise, it will not be found.
48.Pp
49A major user of
50.Fn vfs_getvfs
50is NFS, which uses the fsid as part of file handles in order to determine the
51is NFS, which uses the
52.Vt fsid
53as part of file handles in order to determine the
51filesystem a given RPC is for.
52If
53.Fn vfs_getvfs
54fails to find the mount point related to
54filesystem a given RPC is for.
55If
56.Fn vfs_getvfs
57fails to find the mount point related to
55.Fa fsid
58.Fa fsid ,
56the filesystem is considered stale.
57.Sh RETURN VALUES
58If
59.Fa fsid
59the filesystem is considered stale.
60.Sh RETURN VALUES
61If
62.Fa fsid
60is found the mount point for the id is returned; otherwise,
63is found, the mount point for the ID is returned; otherwise,
61.Dv NULL
62is returned.
63.Sh PSEUDOCODE
64.Bd -literal
64.Dv NULL
65is returned.
66.Sh PSEUDOCODE
67.Bd -literal
65 if ((mp = vfs_getvfs(&fhp->fh_fsid)) == NULL) {
66 error = ESTALE;
67 goto out;
68 }
68if ((mp = vfs_getvfs(&fhp->fh_fsid)) == NULL) {
69 error = ESTALE;
70 goto out;
71}
69.Ed
72.Ed
73.Sh SEE ALSO
74.Xr vfs_getnewfsid 9
70.Sh AUTHORS
71This man page was written by
72.An Chad David Aq davidc@acns.ab.ca .
75.Sh AUTHORS
76This man page was written by
77.An Chad David Aq davidc@acns.ab.ca .