logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

vfs_getnewfsid — allocate a new file system identifier

Authors

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

Debian                                          November 21, 2001                              VFS_GETNEWFSID(9)

Description

       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;

Name

       vfs_getnewfsid — allocate a new file system identifier

Pseudocode

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

See Also

vfs_getvfs(9)

Synopsis

#include<sys/param.h>#include<sys/mount.h>voidvfs_getnewfsid(structmount*mp);

See Also