summaryrefslogtreecommitdiff
path: root/static/freebsd/man9/VFS_SYNC.9 4.html
blob: 7d0c105dd352bbc043bf6b20d2e3813ad5e177ac (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">VFS_SYNC(9)</td>
    <td class="head-vol">Kernel Developer's Manual</td>
    <td class="head-rtitle">VFS_SYNC(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_SYNC</code> &#x2014; <span class="Nd">flush
    unwritten data</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>
  <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">VFS_SYNC</code>(<var class="Fa" style="white-space: nowrap;">struct
    mount *mp</var>, <var class="Fa" style="white-space: nowrap;">int
    waitfor</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_SYNC"><code class="Fn" id="VFS_SYNC">VFS_SYNC</code></a>()
    macro writes out all unwritten data in the file system mounted as
    <var class="Fa">mp</var>.</p>
<p class="Pp">The arguments it expects are:</p>
<dl class="Bl-tag">
  <dt><var class="Fa">mp</var></dt>
  <dd>The file system.</dd>
  <dt><var class="Fa">waitfor</var></dt>
  <dd>Whether the function should wait for I/O to complete. Possible values are:
    <dl class="Bl-tag">
      <dt id="MNT_WAIT"><a class="permalink" href="#MNT_WAIT"><code class="Dv">MNT_WAIT</code></a></dt>
      <dd>synchronously wait for I/O to complete</dd>
      <dt id="MNT_NOWAIT"><a class="permalink" href="#MNT_NOWAIT"><code class="Dv">MNT_NOWAIT</code></a></dt>
      <dd>start all I/O, but do not wait for it</dd>
      <dt id="MNT_LAZY"><a class="permalink" href="#MNT_LAZY"><code class="Dv">MNT_LAZY</code></a></dt>
      <dd>push data not written by file system syncer</dd>
    </dl>
  </dd>
</dl>
<p class="Pp" id="VFS_SYNC~2">The
    <a class="permalink" href="#VFS_SYNC~2"><code class="Fn">VFS_SYNC</code></a>()
    macro calls the <var class="Va">vfs_sync</var> method of the file system,
    which normally calls <a class="Xr">VOP_FSYNC(9)</a> for all the vnodes in
    the file system.</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">fsync(2)</a>, <a class="Xr">sync(2)</a>,
    <a class="Xr">VFS(9)</a>, <a class="Xr">vnode(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">Doug
    Rabson</span>.</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">May 23, 2009</td>
    <td class="foot-os">FreeBSD 15.0</td>
  </tr>
</table>