blob: 033ea412580a24e060dd46dad4498326495c0685 (
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
73
74
|
<table class="head">
<tr>
<td class="head-ltitle">VOP_INACTIVE(9)</td>
<td class="head-vol">Kernel Developer's Manual</td>
<td class="head-rtitle">VOP_INACTIVE(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">VOP_INACTIVE</code>,
<code class="Nm">VOP_RECLAIM</code> — <span class="Nd">reclaim file
system resources for a vnode</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
<<a class="In">sys/param.h</a>></code>
<br/>
<code class="In">#include <<a class="In">sys/vnode.h</a>></code></p>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">VOP_INACTIVE</code>(<var class="Fa" style="white-space: nowrap;">struct
vnode *vp</var>, <var class="Fa" style="white-space: nowrap;">struct thread
*td</var>);</p>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">VOP_RECLAIM</code>(<var class="Fa" style="white-space: nowrap;">struct
vnode *vp</var>, <var class="Fa" style="white-space: nowrap;">struct thread
*td</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The arguments are:</p>
<dl class="Bl-tag">
<dt><var class="Fa">vp</var></dt>
<dd>The vnode being reclaimed.</dd>
</dl>
<p class="Pp" id="VOP_INACTIVE"><a class="permalink" href="#VOP_INACTIVE"><code class="Fn">VOP_INACTIVE</code></a>()
is usually called when the kernel is no longer using the vnode. However,
there is no guarantee that it will be called at all, for example if the last
reference was dropped while the vnode lock could not be upgraded to
exclusive without sleeping. This may be because the reference count reaches
zero or it may be that the file system is being forcibly unmounted while
there are open files. It can be used to reclaim space on the last close of
an ‘open but deleted’ file.</p>
<p class="Pp" id="VOP_RECLAIM"><a class="permalink" href="#VOP_RECLAIM"><code class="Fn">VOP_RECLAIM</code></a>()
is called when a vnode is being reused for a different file system. Any file
system specific resources associated with the vnode should be freed.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="LOCKS"><a class="permalink" href="#LOCKS">LOCKS</a></h1>
<p class="Pp">For both <code class="Fn">VOP_INACTIVE</code>() and
<code class="Fn">VOP_RECLAIM</code>(), the <var class="Fa">vp</var> will be
exclusively locked on entry, and must be left exclusively locked on
return.</p>
</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">vnode(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">Doug
Rabson</span>.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">March 15, 2019</td>
<td class="foot-os">FreeBSD 15.0</td>
</tr>
</table>
|