blob: 18959c8ee66dfd44f196d3e264151478a1ed31c7 (
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
112
113
114
115
116
117
118
119
120
121
122
123
|
<table class="head">
<tr>
<td class="head-ltitle">FSS(4)</td>
<td class="head-vol">Device Drivers Manual</td>
<td class="head-rtitle">FSS(4)</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">fss</code> — <span class="Nd">file system
snapshot device</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="Cd">pseudo-device fss 4</code></p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The <code class="Nm">fss</code> driver provides a read-only
interface to the snapshot of a currently mounted file system. Reading from a
<code class="Nm">fss</code> device gives the view of the file system when
the snapshot was taken. It can be configured via
<a class="Xr">ioctl(2)</a>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="IOCTLS"><a class="permalink" href="#IOCTLS">IOCTLS</a></h1>
<p class="Pp">The <a class="Xr">ioctl(2)</a> command codes below are defined in
<code class="In"><<a class="In">sys/dev/fssvar.h</a>></code>.</p>
<p class="Pp">The (third) argument to <a class="Xr">ioctl(2)</a> should be a
pointer to the type indicated.</p>
<dl class="Bl-tag">
<dt id="FSSIOCSET(struct"><a class="permalink" href="#FSSIOCSET(struct"><code class="Dv">FSSIOCSET(struct
fss_set)</code></a></dt>
<dd>Configures a <code class="Nm">fss</code> device.
<div class="Bd Pp Bd-indent Li">
<pre>struct fss_set {
char *fss_mount;
char *fss_bstore;
blksize_t fss_csize;
int fss_flags;
};</pre>
</div>
<p class="Pp">The struct element <var class="Va">fss_mount</var> is the
mount point of the file system. The struct element
<var class="Va">fss_bstore</var> is either a regular file or a raw disk
device where data overwritten on the file system will be saved. The
struct element <var class="Va">fss_csize</var> is the preferred size of
this data. The struct element <var class="Va">fss_flags</var> is the
initial set of flags.</p>
</dd>
<dt id="FSSIOCGET(struct"><a class="permalink" href="#FSSIOCGET(struct"><code class="Dv">FSSIOCGET(struct
fss_get)</code></a></dt>
<dd>Gets the status of a <code class="Nm">fss</code> device.
<div class="Bd Pp Bd-indent Li">
<pre>struct fss_get {
char fsg_mount[MNAMELEN];
struct timeval fsg_time;
blksize_t fsg_csize;
blkcnt_t fsg_mount_size;
blkcnt_t fsg_bs_size;
};</pre>
</div>
The struct element <var class="Va">fsg_mount</var> is the mount point of the
file system. The struct element <var class="Va">fsg_time</var> is the time
this snapshot was taken. The struct element
<var class="Va">fsg_csize</var> is the current size of data clusters. The
struct element <var class="Va">fsg_mount_size</var> is the number of
clusters of the file system. The struct element
<var class="Va">fsg_bs_size</var> is the number of clusters written to the
backing store.</dd>
<dt id="FSSIOCCLR"><a class="permalink" href="#FSSIOCCLR"><code class="Dv">FSSIOCCLR</code></a></dt>
<dd>Unconfigures a <code class="Nm">fss</code> device.</dd>
<dt id="FSSIOFSET(int)"><a class="permalink" href="#FSSIOFSET(int)"><code class="Dv">FSSIOFSET(int)</code></a></dt>
<dd>Sets the flags of a <code class="Nm">fss</code> device. Possible flags
are:
<dl class="Bl-tag">
<dt id="FSS_UNCONFIG_ON_CLOSE"><a class="permalink" href="#FSS_UNCONFIG_ON_CLOSE"><code class="Dv">FSS_UNCONFIG_ON_CLOSE</code></a></dt>
<dd>Unconfigure the <code class="Nm">fss</code> device on the last
close.</dd>
<dt id="FSS_UNLINK_ON_CREATE"><a class="permalink" href="#FSS_UNLINK_ON_CREATE"><code class="Dv">FSS_UNLINK_ON_CREATE</code></a></dt>
<dd>Unlink the backing file before the <code class="Nm">fss</code> device
is created.</dd>
</dl>
</dd>
<dt id="FSSIOFGET(int)"><a class="permalink" href="#FSSIOFGET(int)"><code class="Dv">FSSIOFGET(int)</code></a></dt>
<dd>Gets the flags of a <code class="Nm">fss</code> device.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="KERNEL_THREADS"><a class="permalink" href="#KERNEL_THREADS">KERNEL
THREADS</a></h1>
<p class="Pp">For each active snapshot device there is a kernel thread that
handles the backing store. This thread is named <var class="Va">fssN</var>
where <var class="Va">N</var> is the device minor number.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1>
<dl class="Bl-tag Bl-compact">
<dt><span class="Pa">/dev/rfss?</span></dt>
<dd style="width: auto;"> </dd>
<dt><span class="Pa">/dev/fss?</span></dt>
<dd style="width: auto;"> </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">fssconfig(8)</a>, <a class="Xr">mount(8)</a>,
<a class="Xr">umount(8)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp">The <code class="Nm">fss</code> device appeared in
<span class="Ux">NetBSD 2.0</span>.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">February 24, 2011</td>
<td class="foot-os">NetBSD 10.1</td>
</tr>
</table>
|