summaryrefslogtreecommitdiff
path: root/static/freebsd/man9/vfs_getnewfsid.9 4.html
blob: 62b4b66bdc058cd923d4048acb5a2fef2b49716a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<table class="head">
  <tr>
    <td class="head-ltitle">VFS_GETNEWFSID(9)</td>
    <td class="head-vol">Kernel Developer's Manual</td>
    <td class="head-rtitle">VFS_GETNEWFSID(9)</td>
  </tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">vfs_getnewfsid</code> &#x2014;
    <span class="Nd">allocate a new file system identifier</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="In">#include
    &lt;<a class="In">sys/param.h</a>&gt;</code>
  <br/>
  <code class="In">#include &lt;<a class="In">sys/mount.h</a>&gt;</code></p>
<p class="Pp"><var class="Ft">void</var>
  <br/>
  <code class="Fn">vfs_getnewfsid</code>(<var class="Fa" style="white-space: nowrap;">struct
    mount *mp</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The
    <a class="permalink" href="#vfs_getnewfsid"><code class="Fn" id="vfs_getnewfsid">vfs_getnewfsid</code></a>()
    function allocates a new file system identifier for the mount point given.
    File systems typically call <code class="Fn">vfs_getnewfsid</code>() 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
    <a class="Xr">vfs_getvfs(9)</a>.</p>
<p class="Pp">The actual <var class="Vt">fsid</var> is made up of two 32 bit
    integers, that are stored in the <var class="Vt">statfs</var> structure of
    <var class="Fa">mp</var>. The first integer is unique in the set of mounted
    file systems, while the second holds the file system type.</p>
<div class="Bd Pp Li">
<pre>typedef	struct fsid {
	int32_t val[2];
} fsid_t;</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="PSEUDOCODE"><a class="permalink" href="#PSEUDOCODE">PSEUDOCODE</a></h1>
<div class="Bd Li">
<pre>xxx_mount(struct mount *mp, char *path, caddr_t data,
	struct nameidata *ndp, struct thread *td)
{
	...
	vfs_getnewfsid(mp);
	...
}</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
  ALSO</a></h1>
<p class="Pp"><a class="Xr">vfs_getvfs(9)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">This manual page was written by <span class="An">Chad David</span>
    &lt;<a class="Mt" href="mailto:davidc@acns.ab.ca">davidc@acns.ab.ca</a>&gt;.</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">November 21, 2001</td>
    <td class="foot-os">FreeBSD 15.0</td>
  </tr>
</table>