-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
126 lines (116 loc) · 5.38 KB
/
index.html
File metadata and controls
126 lines (116 loc) · 5.38 KB
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
124
125
126
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Writing a FUSE Filesystem: a Tutorial</title>
</head>
<body>
<h1>Writing a FUSE Filesystem: a Tutorial</h1>
<h3>Joseph J. Pfeiffer, Jr., Ph.D.<br />
Emeritus Professor<br />
Department of Computer Science<br />
New Mexico State University<br />
<a href="pfeiffer@cs.nmsu.edu" >pfeiffer@cs.nmsu.edu</a></h3>
<p>Version of 2017-10-03</p>
<p>One of the real contributions of Unix has been the view that
"everything is a file". A tremendous number of radically
different sorts of objects, from data storage to file format
conversions to internal operating system data structures, have been
mapped to the file abstraction.
</p>
<p>
One of the more recent directions this view has taken has been
Filesystems in User Space, or FUSE (no, the acronym really doesn't
work. Oh well). The idea here is that if you can envision
your interaction with an object in terms of a directory structure
and filesystem operations, you can write a FUSE file system to
provide that interaction. You just write code that implements
file operations like <code>open()</code>, <code>read()</code>, and
<code>write()</code>; when your filesystem is mounted, programs
are able to access the data using the standard file operation
system calls, which call your code.
</p>
<p>
FUSE filesystems have been written to do everything from providing
remote access to files on a different host without using NFS or CIFS
(see SSHFS at <a href="https://github.com/libfuse/sshfs"
>https://github.com/libfuse/sshfs</a>) to implementing a filesystem to
talk to devices using the Media Transfer protocol (see jmtpfs at <a
href="https://github.com/kiorky/jmtpfs"
>https://github.com/kiorky/jmtpfs</a>) to organizing a music
collection with directories based on MP3 tags (see id3fs at <a
href="http://erislabs.net/ianb/projects/id3fs/id3fsd.html"
>http://erislabs.net/ianb/projects/id3fs/id3fsd.html</a>) to, really,
almost anything. The possibilities are only limited by your
imagination!
</p>
<p>
There are many documents on the web describing how FUSE works and
how to install and use a FUSE filesystem, but I haven't come across
any that try to describe how to go about actually writing one. The
goal of this tutorial is to meet what I see as a need for such a
document.
</p>
<p>
This tutorial introduces FUSE using a filesystem I call the "Big Brother
File System" (the reason for the name is that "Big Brother is
watching"). The filesystem simply passes every operation down to an
underlying directory, but logs the operation.
</p>
<p>
This tutorial, together with its associated example filesystem, is
available as a tarball at
<a href="http://www.cs.nmsu.edu/~pfeiffer/fuse-tutorial.tgz">
<code>http://www.cs.nmsu.edu/~pfeiffer/fuse-tutorial.tgz</code></a>.
</p>
<p>
<b>Audience:</b> This tutorial is aimed at developers who have some
familiarity with general programming in Linux (and Unix-like operating
systems in general), so you know how to untar a tarball, how Makefiles
work, and so forth. I won't be going through the details of how to
perform those tasks; I'll be focussing on what you need to know that's
specific to using FUSE filesystems.
</p>
<p>
I am not affiliated with the FUSE project in any way, except as a
user. My descriptions of the interface to fuse, and of techniques to
work with it, are a distillation of my reading of the existing
documentation, and my experience working with it. Consequently, any
errors are mine (and corrections are welcome!).
</p>
<h2>Organization</h2>
<p>
You will find three subdirectories under this one:
</p>
<ul>
<li>
<code>html</code></a> contains the tutorial itself, in html format.
I suggest you <a href="html/index.html" >click here</a> to start
reading the tutorial.
</li>
<li>
<code>src</code> contains the code for the BBFS filesystem itself.
</li>
<li>
<code>example</code> contains a couple of directories for use in
exploring BBFS.
</li>
</ul>
<h2>Consulting</h2>
<p>
I'm happy to answer any questions you may have regarding BBFS or FUSE
in general. Also, I am available for consulting on FUSE or other
Linux system, or PIC microprocessor, development. If you're interested, send me an email at
<a href="mailto:joseph@pfeifferfamily.net"><code>joseph@pfeifferfamily.net</code></a>
</p>
<h2>License</h2>
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/Text" property="dct:title" rel="dct:type">Writing a FUSE Filesystem: a Tutorial</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://www.cs.nmsu.edu/~pfeiffer/fuse-tutorial/" property="cc:attributionName" rel="cc:attributionURL">Joseph J. Pfeiffer, Jr., PhD</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_US">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License</a>.
<p>
The code found in <code>src/bbfs.c</code> is derived from the
function prototypes found in <code>/usr/include/fuse/fuse.h</code>,
which is licensed under the LGPLv2. My code is being released under
the GPLv3. See the file
<a href="src/COPYING"><code>src/COPYING</code>
</p>
<hr>
<address></address>
<!-- hhmts start -->Last modified: Tue Oct 3 15:02:57 MDT 2017 <!-- hhmts end -->
</body> </html>