vfs_busy (9)
Leading comments
Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. 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(s), this list of conditions and the following disclaimer as the first lines of this file unmodified other than the possible addition of one or more copyright notices. 2. Redistributions in binary for...
NAME
vfs_busy - marks a mount point as busySYNOPSIS
In sys/param.h In sys/mount.h Ft int Fn vfs_busy struct mount *mp int flagsDESCRIPTION
The Fn vfs_busy function marks a mount point as busy by incrementing the reference count of a mount point. It also delays unmounting by sleeping on Fa mp if the MNTK_UNMOUNT flag is set in Fa mp->mnt_kern_flag and the MBF_NOWAIT flag is not set.Its arguments are:
- Fa mp
- The mount point to busy.
- Fa flags
-
Flags controlling how
Fn vfs_busy
should act.
- MBF_NOWAIT
- do not sleep if MNTK_UNMOUNT is set.
- MBF_MNTLSTLOCK
- drop the mountlist_mtx in the critical path.
RETURN VALUES
A 0 value is returned on success. If the mount point is being unmounted and MBF_NOWAIT flag is specified Er ENOENT will be returned.ERRORS
- Bq Er ENOENT
- The mount point is being unmounted ( MNTK_UNMOUNT is set).