*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> vfs_mountedon (9)              
Title
Content
Arch
Section
 

VFS_MOUNTEDON(9)

Contents


NAME    [Toc]    [Back]

     vfs_mountedon -- check if the vnode belongs to a mounted file system

SYNOPSIS    [Toc]    [Back]

     #include <sys/param.h>
     #include <sys/mount.h>

     int
     vfs_mountedon(struct vnode *vp);

DESCRIPTION    [Toc]    [Back]

     vfs_mountedon() inspects the mount structure in vp to determine if it
     points to a valid mount point.  If the mount is valid, the vnode is considered
 to be busy.

     A common use of vfs_mountedon() is to call it on device vnodes to determine
 if they are already associated with a file system.  This is done to
     prevent multiple mounts on the same device.

RETURN VALUES    [Toc]    [Back]

     EBUSY is returned if the vnode has a valid mount point; otherwise, 0 is
     returned.

PSEUDOCODE    [Toc]    [Back]

     int
     ffs_mountfs(devvp, mp, td, malloctype)
	     register struct vnode *devvp;
	     struct mount *mp;
	     struct thread *td;
	     struct malloc_type *malloctype;
     {
	     ...

	     error = vfs_mountedon(devvp);
	     if (error)
		     return (error);

	     ...
     }

AUTHORS    [Toc]    [Back]

     This manual page was written by Chad David <davidc@acns.ab.ca>.


FreeBSD 5.2.1		       November 21, 2001		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
ustat HP-UX get mounted file system statistics
fsctl IRIX operations on a mounted file system
mnttab HP-UX mounted file system table
rmtab IRIX remotely mounted file system table
mklost+found Linux create a lost+found directory on a mounted Linux second extended file system
pfs_fstab HP-UX static file system mounting table, mounted file systems table
VOP_INACTIVE FreeBSD reclaim file system resources for a vnode
VFS_ROOT FreeBSD return the root vnode of a file system
VOP_RECLAIM FreeBSD reclaim file system resources for a vnode
vclean OpenBSD disassociate the underlying file system from a vnode
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service