summaryrefslogtreecommitdiff
path: root/static/freebsd/man9/vinvalbuf.9 4.html
blob: 8e16da5b2f748bc365bcb87108e43bf039b61852 (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<table class="head">
  <tr>
    <td class="head-ltitle">VINVALBUF(9)</td>
    <td class="head-vol">Kernel Developer's Manual</td>
    <td class="head-rtitle">VINVALBUF(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">vinvalbuf</code> &#x2014;
    <span class="Nd">flushes and invalidates all buffers associated with 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
    &lt;<a class="In">sys/param.h</a>&gt;</code>
  <br/>
  <code class="In">#include &lt;<a class="In">sys/vnode.h</a>&gt;</code></p>
<p class="Pp"><var class="Ft">int</var>
  <br/>
  <code class="Fn">vinvalbuf</code>(<var class="Fa" style="white-space: nowrap;">struct
    vnode *vp</var>, <var class="Fa" style="white-space: nowrap;">int
    flags</var>, <var class="Fa" style="white-space: nowrap;">struct ucred
    *cred</var>, <var class="Fa" style="white-space: nowrap;">int slpflag</var>,
    <var class="Fa" style="white-space: nowrap;">int slptimeo</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="#vinvalbuf"><code class="Fn" id="vinvalbuf">vinvalbuf</code></a>()
    function invalidates all of the buffers associated with the given vnode.
    This includes buffers on the clean list and the dirty list. If the
    <code class="Dv">V_SAVE</code> flag is specified then the buffers on the
    dirty list are synced prior to being released. If there is a VM Object
    associated with the vnode, it is removed.</p>
<p class="Pp">Its arguments are:</p>
<dl class="Bl-tag">
  <dt><var class="Fa">vp</var></dt>
  <dd>A pointer to the vnode whose buffers will be invalidated.</dd>
  <dt><var class="Fa">flags</var></dt>
  <dd>The only supported flag is <code class="Dv">V_SAVE</code> and it indicates
      that dirty buffers should be synced with the disk.</dd>
  <dt><var class="Fa">cred</var></dt>
  <dd>The user credentials that are used to <a class="Xr">VOP_FSYNC(9)</a>
      buffers if <code class="Dv">V_SAVE</code> is set.</dd>
  <dt><var class="Fa">slpflag</var></dt>
  <dd>The slp flag that will be used in the priority of any sleeps in the
      function.</dd>
  <dt><var class="Fa">slptimeo</var></dt>
  <dd>The timeout for any sleeps in the function.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="LOCKS"><a class="permalink" href="#LOCKS">LOCKS</a></h1>
<p class="Pp">The vnode is assumed to be locked prior to the call and remains
    locked upon return.</p>
<p class="Pp"><var class="Va">Giant</var> must be held by prior to the call and
    remains locked upon return.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
  VALUES</a></h1>
<p class="Pp">A 0 value is returned on success.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="PSEUDOCODE"><a class="permalink" href="#PSEUDOCODE">PSEUDOCODE</a></h1>
<div class="Bd Bd-indent Li">
<pre>vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = vinvalbuf(devvp, V_SAVE, cred, 0, 0);
VOP_UNLOCK(devvp, 0);
if (error)
	return (error);</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
<dl class="Bl-tag">
  <dt id="ENOSPC">[<a class="permalink" href="#ENOSPC"><code class="Er">ENOSPC</code></a>]</dt>
  <dd>The file system is full. (With <code class="Dv">V_SAVE</code>)</dd>
  <dt id="EDQUOT">[<a class="permalink" href="#EDQUOT"><code class="Er">EDQUOT</code></a>]</dt>
  <dd>Disc quota exceeded. (With <code class="Dv">V_SAVE</code>)</dd>
  <dt id="EWOULDBLOCK">[<a class="permalink" href="#EWOULDBLOCK"><code class="Er">EWOULDBLOCK</code></a>]</dt>
  <dd>Sleep operation timed out. (See <var class="Fa">slptimeo</var>)</dd>
  <dt id="ERESTART">[<a class="permalink" href="#ERESTART"><code class="Er">ERESTART</code></a>]</dt>
  <dd>A signal needs to be delivered and the system call should be restarted.
      (With <code class="Dv">PCATCH</code> set in
    <var class="Fa">slpflag</var>)</dd>
  <dt id="EINTR">[<a class="permalink" href="#EINTR"><code class="Er">EINTR</code></a>]</dt>
  <dd>The system has been interrupted by a signal. (With
      <code class="Dv">PCATCH</code> set in <var class="Fa">slpflag</var>)</dd>
</dl>
</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">tsleep(9)</a>, <a class="Xr">VOP_FSYNC(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">October 20, 2008</td>
    <td class="foot-os">FreeBSD 15.0</td>
  </tr>
</table>