libhammer.3: Fix unknown reference.
[dragonfly.git] / lib / libhammer / libhammer.3
1 .\"
2 .\" Copyright (c) 2015 The DragonFly Project.  All rights reserved.
3 .\"
4 .\" This code is derived from software contributed to The DragonFly Project
5 .\" by Antonio Huete Jimenez <tuxillo@quantumachine.net>
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\"
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\"    notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\"    notice, this list of conditions and the following disclaimer in
15 .\"    the documentation and/or other materials provided with the
16 .\"    distribution.
17 .\" 3. Neither the name of The DragonFly Project nor the names of its
18 .\"    contributors may be used to endorse or promote products derived
19 .\"    from this software without specific, prior written permission.
20 .\"
21 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
25 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
31 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" SUCH DAMAGE.
33 .\"
34 .Dd February 19, 2015
35 .Dt LIBHAMMER 3
36 .Os
37 .Sh NAME
38 .Nm hammer
39 .Nd HAMMER file system interface
40 .Sh LIBRARY
41 .Lb libhammer
42 .Sh SYNOPSIS
43 .In libhammer.h
44 .Sh DESCRIPTION
45 The
46 .Nm
47 library provides a set of functions which serve as an interface to applications
48 that need to obtain information or perform maintenance operations in
49 .Xr HAMMER 5
50 file systems.
51 .Sh INTRODUCTION
52 This library is an attempt to factor out most of the code in the initial
53 .Xr hammer 8
54 program greatly reducing its complexity and taking advantage of all the
55 functionality it contained helping other programs to reuse it.
56 .Pp
57 There are several parts of the
58 .Xr HAMMER 5
59 file system for which this library provides an API:
60 .Bl -bullet
61 .It
62 .Em Information facilities:
63 The following information is gathered and exposed by this library:
64 .Bl -dash -offset indent
65 .It
66 File system specific information such as size, big block details, version,
67 PFSes, snapshots, mount points.
68 .It
69 Statistical data like number of B-Tree operations, number of device operations,
70 number of undo operations.
71 .El
72 .It
73 .Em Pseudo-file systems:
74 These are independent sub file systems within a HAMMER file system.
75 After
76 .Nm
77 library initialisation the list of pseudo-file systems will be available in the
78 .Vt libhammer_fsinfo
79 structure within a
80 .Dv TAILQ .
81 .Pp
82 Creating and deleting pseudo-file systems is not yet supported by this library.
83 .It
84 .Em Snapshots:
85 Per PFS point in time snapshots are kept in the file system meta-data since
86 HAMMER version 3.
87 A list of snapshots is collected and placed within a
88 .Dv TAILQ
89 for each PFS.
90 .Pp
91 Creating and deleting snapshots is not yet supported by this library.
92 .El
93 .Sh INITIALISATION
94 Before any API call the library must be initalised with the
95 .Fn libhammer_get_fsinfo
96 function.
97 This will perform all the operations needed to initialise the data structures in
98 which the API function rely for the specified HAMMER file system.
99 .Pp
100 Once you are done, the special function
101 .Fn libhammer_free_fsinfo
102 will release all the resources used by the library during its initialisation and
103 usage.
104 .Sh SEE ALSO
105 .Xr HAMMER 5 ,
106 .Xr hammer 8 ,
107 .Xr libhammer_fsinfo 3 ,
108 .Xr libhammer_snapshot 3 ,
109 .Xr libhammer_stats 3
110 .Sh AUTHORS
111 This man page was written by
112 .An Antonio Huete Jimenez Aq Mt tuxillo@quantumachine.net .
113 .Sh BUGS
114 Please note that, at the moment of writing this man page, the
115 .Nm
116 library is incomplete.