From a627a459f84a3abc8e8fb30ee0148fc52b5b3a77 Mon Sep 17 00:00:00 2001 From: iedowse Date: Tue, 1 Jul 2003 17:40:23 +0000 Subject: Add a new mount flag MNT_BYFSID that can be used to unmount a file system by specifying the file system ID instead of a path. Use this by default in umount(8). This avoids the need to perform any vnode operations to look up the mount point, so it makes it possible to unmount a file system whose root vnode cannot be looked up (e.g. due to a dead NFS server, or a file system that has become detached from the hierarchy because an underlying file system was unmounted). It also provides an unambiguous way to specify which file system is to be unmunted. Since the ability to unmount using a path name is retained only for compatibility, that case now just uses a simple string comparison of the supplied path against f_mntonname of each mounted file system. Discussed on: freebsd-arch mdoc help from: ru --- lib/libc/sys/mount.2 | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'lib/libc/sys') diff --git a/lib/libc/sys/mount.2 b/lib/libc/sys/mount.2 index 838c1e6..1b551ed 100644 --- a/lib/libc/sys/mount.2 +++ b/lib/libc/sys/mount.2 @@ -32,7 +32,7 @@ .\" @(#)mount.2 8.3 (Berkeley) 5/24/95 .\" $FreeBSD$ .\" -.Dd June 30, 2003 +.Dd July 1, 2003 .Dt MOUNT 2 .Os .Sh NAME @@ -183,6 +183,22 @@ even if files are still active. Active special devices continue to work, but any further accesses to any other active files result in errors even if the file system is later remounted. +.Pp +If the +.Dv MNT_BYFSID +flag is specified, +.Fa dir +should instead be a file system ID encoded as +.Dq Li FSID : Ns Ar val0 : Ns Ar val1 , +where +.Ar val0 +and +.Ar val1 +are the contents of the +.Vt fsid_t +.Va val[] +array in decimal. +The file system that has the specified file system ID will be unmounted. .Sh RETURN VALUES .Rv -std .Sh ERRORS -- cgit v1.1