GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
VFS_GETNEWFSID(9) FreeBSD Kernel Developer's Manual VFS_GETNEWFSID(9)

vfs_getnewfsid
allocate a new file system identifier

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

void
vfs_getnewfsid(struct mount *mp);

The vfs_getnewfsid() function allocates a new file system identifier for the mount point given. File systems typically call vfs_getnewfsid() in their mount routine in order to acquire a unique ID within the system which can later be used to uniquely identify the file system via calls such as vfs_getvfs(9).

The actual fsid is made up of two 32 bit integers, that are stored in the statfs structure of mp. The first integer is unique in the set of mounted file systems, while the second holds the file system type.

typedef	struct fsid {
	int32_t val[2];
} fsid_t;

xxx_mount(struct mount *mp, char *path, caddr_t data,
	struct nameidata *ndp, struct thread *td)
{
	...
	vfs_getnewfsid(mp);
	...
}

vfs_getvfs(9)

This manual page was written by Chad David <davidc@acns.ab.ca>.
November 21, 2001 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 9 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.