.th K_unmount II 4/21/86
.sh NAME
K_unmount - unmount file system
.sh "MODULA SYNOPSIS"
.nf
 CONST nsp: nsp_type;
 VAR stat: K_err_num;
 . . .
 stat := NK_unmount(nsp);
.sp
.sh "C SYNOPSIS"
 nsp_type nsp;
 int stat;
 . . .
 stat = K_unmount (nsp);
.sp
.fi
.sh DESCRIPTION
The Kernel primitive K_unmount logically unmounts the file system
specified by the name space partition nsp.  The following checks must
be satisfied before the Kernel will unmount a file system:
.sp
    \(bu the process must have the privilege to issue the call
.sp
    \(bu the device must have the file system mounted on it
.sp
    \(bu the extent must be tranquil (no open files)
.sp
.sp
After normal completion of the Kernel call, the disk has been returned
to the `unmounted' condition and can be mounted again in the future
without performing file recovery.
.sp
Should a disk device fail and have to be shut down, it is still possible to
perform a
K_unmount
to inform the Kernel that the file system is now
unmounted.  Although the
K_unmount
will return an I/O error exception
(\c
Xerror
or
Xfault\c
) the Kernel's internal database will still be purged of information about
the file system.  This allows mounting the disk on another drive and
(after file system recovery, if required) remounting the file system.
.sh EXCEPTIONS
.lp 22 15
XbadNsp	Seid does not specify a filesystem.
.lp 22 15
XnoPriv	Process does not have PrivMount privilege.
.lp 22 15
XnoTranquil	Filesystem is active.
.i0
.sh "SEE ALSO"
K_mount(II), umt(VIII)
