1ffc0b97fSAlfred Perlstein.\" 2ffc0b97fSAlfred Perlstein.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved. 3ffc0b97fSAlfred Perlstein.\" 4ffc0b97fSAlfred Perlstein.\" Redistribution and use in source and binary forms, with or without 5ffc0b97fSAlfred Perlstein.\" modification, are permitted provided that the following conditions 6ffc0b97fSAlfred Perlstein.\" are met: 7ffc0b97fSAlfred Perlstein.\" 1. Redistributions of source code must retain the above copyright 8ffc0b97fSAlfred Perlstein.\" notice(s), this list of conditions and the following disclaimer as 9ffc0b97fSAlfred Perlstein.\" the first lines of this file unmodified other than the possible 10ffc0b97fSAlfred Perlstein.\" addition of one or more copyright notices. 11ffc0b97fSAlfred Perlstein.\" 2. Redistributions in binary form must reproduce the above copyright 12ffc0b97fSAlfred Perlstein.\" notice(s), this list of conditions and the following disclaimer in the 13ffc0b97fSAlfred Perlstein.\" documentation and/or other materials provided with the distribution. 14ffc0b97fSAlfred Perlstein.\" 15ffc0b97fSAlfred Perlstein.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY 16ffc0b97fSAlfred Perlstein.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17ffc0b97fSAlfred Perlstein.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18ffc0b97fSAlfred Perlstein.\" DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 19ffc0b97fSAlfred Perlstein.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20ffc0b97fSAlfred Perlstein.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21ffc0b97fSAlfred Perlstein.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22ffc0b97fSAlfred Perlstein.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23ffc0b97fSAlfred Perlstein.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24ffc0b97fSAlfred Perlstein.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 25ffc0b97fSAlfred Perlstein.\" DAMAGE. 26ffc0b97fSAlfred Perlstein.\" 27ffc0b97fSAlfred Perlstein.Dd November 21, 2001 28ffc0b97fSAlfred Perlstein.Dt VFS_GETNEWFSID 9 29ffc0b97fSAlfred Perlstein.Os 30ffc0b97fSAlfred Perlstein.Sh NAME 31ffc0b97fSAlfred Perlstein.Nm vfs_getnewfsid 321f620c2eSRuslan Ermilov.Nd "allocate a new file system identifier" 33ffc0b97fSAlfred Perlstein.Sh SYNOPSIS 34ffc0b97fSAlfred Perlstein.In sys/param.h 35ffc0b97fSAlfred Perlstein.In sys/mount.h 36ffc0b97fSAlfred Perlstein.Ft void 37ffc0b97fSAlfred Perlstein.Fn vfs_getnewfsid "struct mount *mp" 38ffc0b97fSAlfred Perlstein.Sh DESCRIPTION 39ffc0b97fSAlfred PerlsteinThe 40ffc0b97fSAlfred Perlstein.Fn vfs_getnewfsid 41ffc0b97fSAlfred Perlsteinfunction allocates a new file system identifier for the mount point given. 42ffc0b97fSAlfred PerlsteinFile systems typically call 43ffc0b97fSAlfred Perlstein.Fn vfs_getnewfsid 441f620c2eSRuslan Ermilovin their mount routine in order to acquire a unique ID within the system 45ffc0b97fSAlfred Perlsteinwhich can later be used to uniquely identify the file system via calls such as 461f620c2eSRuslan Ermilov.Xr vfs_getvfs 9 . 47ffc0b97fSAlfred Perlstein.Pp 481f620c2eSRuslan ErmilovThe actual 491f620c2eSRuslan Ermilov.Vt fsid 501f620c2eSRuslan Ermilovis made up of two 32 bit integers, that are stored in the 511f620c2eSRuslan Ermilov.Vt statfs 52ffc0b97fSAlfred Perlsteinstructure of 53ffc0b97fSAlfred Perlstein.Fa mp . 541f620c2eSRuslan ErmilovThe first integer is unique in the set of mounted file systems, 551f620c2eSRuslan Ermilovwhile the second holds the file system type. 56ffc0b97fSAlfred Perlstein.Bd -literal 57ffc0b97fSAlfred Perlsteintypedef struct fsid { 58ffc0b97fSAlfred Perlstein int32_t val[2]; 59ffc0b97fSAlfred Perlstein} fsid_t; 60ffc0b97fSAlfred Perlstein.Ed 61ffc0b97fSAlfred Perlstein.Sh PSEUDOCODE 62ffc0b97fSAlfred Perlstein.Bd -literal 631f620c2eSRuslan Ermilovxxx_mount(struct mount *mp, char *path, caddr_t data, 641f620c2eSRuslan Ermilov struct nameidata *ndp, struct thread *td) 65ffc0b97fSAlfred Perlstein{ 66ffc0b97fSAlfred Perlstein ... 67ffc0b97fSAlfred Perlstein vfs_getnewfsid(mp); 68ffc0b97fSAlfred Perlstein ... 69ffc0b97fSAlfred Perlstein} 70ffc0b97fSAlfred Perlstein.Ed 71ffc0b97fSAlfred Perlstein.Sh SEE ALSO 72ffc0b97fSAlfred Perlstein.Xr vfs_getvfs 9 73ffc0b97fSAlfred Perlstein.Sh AUTHORS 7409356c84SHiten PandyaThis manual page was written by 75*8a7314fcSBaptiste Daroussin.An Chad David Aq Mt davidc@acns.ab.ca . 76