---
name: "VFS_MOUNT"
section: "9"
platform: "linux"
package: "freebsd-manpages"
version: "6.0-5"
release: "Debian 4.0 (Etch)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/VFS_MOUNT"
---

# VFS\_MOUNT(9)

mount a file system

## NAME

**VFS\_MOUNT** – mount a file system

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<sys/mount.h\>**

**#include \<sys/vnode.h\>**

*int*\

**VFS\_MOUNT**(*struct mount \*mp*, *struct thread \*td*);

## DESCRIPTION

The **VFS\_MOUNT**() macro mounts a file system into the system's namespace or updates the attributes of an already mounted file system.

The arguments it expects are:

- *mp*

  Structure representing the file system.

- *td*

  Thread which is mounting the file system.

The **VFS\_MOUNT**() macro is called both to mount new file systems and to change the attributes of an existing file system. If the MNT\_UPDATE flag is set in *mp-\>mnt\_flag* then the file system should update its internal state from the value of *mp-\>mnt\_flag*. This can be used, for instance, to convert a read-only file system to read-write. It is also used by [mountd(8)](/mountd/8.md) to update the NFS export information for the file system.

If the MNT\_UPDATE flag is not specified, then this is a newly mounted file system. The file system code should allocate and initialize any private data needed to represent the file system (it can use the *mp-\>mnt\_data* field to store this information).

## SEE ALSO

[VFS(9)](/VFS/9.md), [vnode(9)](/vnode/9.md)

## AUTHORS

This manual page was written by Doug Rabson.
