How to Read the Lables on Fuses

Writing a FUSE Filesystem: a Tutorial

Joseph J. Pfeiffer, Jr., Ph.D.
Emeritus Professor
Department of Computer science
New United mexican states State University
pfeiffer@cs.nmsu.edu

Version of 2018-02-04

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 organisation data structures, have been mapped to the file abstraction.

1 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 thought here is that if y'all can envision your interaction with an object in terms of a directory construction and filesystem operations, you lot can write a FUSE file arrangement to provide that interaction. Y'all just write code that implements file operations like open up(), read(), and write(); when your filesystem is mounted, programs are able to access the information using the standard file functioning organisation calls, which call your code.

FUSE filesystems have been written to do everything from providing remote admission to files on a dissimilar host without using NFS or CIFS (run into SSHFS at https://github.com/libfuse/sshfs) to implementing a filesystem to talk to devices using the Media Transfer protocol (see jmtpfs at https://github.com/kiorky/jmtpfs) to organizing a music drove with directories based on MP3 tags (see id3fs at http://erislabs.net/ianb/projects/id3fs/id3fsd.html) to, really, well-nigh anything. The possibilities are but express by your imagination!

There are many documents on the web describing how FUSE works and how to install and apply a FUSE filesystem, but I haven't come up beyond any that attempt to describe how to go about really writing one. The goal of this tutorial is to meet what I see as a demand for such a document.

This tutorial introduces FUSE using a filesystem I call the "Big Brother File Organization" (the reason for the name is that "Big Brother is watching"). The filesystem simply passes every operation down to an underlying directory, only logs the functioning.

This tutorial, together with its associated example filesystem, is bachelor as a tarball at http://www.cs.nmsu.edu/~pfeiffer/fuse-tutorial.tgz.

Audience: This tutorial is aimed at developers who have some familiarity with general programming in Linux (and Unix-similar operating systems in full general), then y'all 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 exist focussing on what you demand to know that'southward specific to using FUSE filesystems.

I am not affiliated with the FUSE project in any way, except equally 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 information technology. Consequently, any errors are mine (and corrections are welcome!).

Organization

You will find three subdirectories under this one:

  • html contains the tutorial itself, in html format. I suggest you click hither to start reading the tutorial.
  • src contains the lawmaking for the BBFS filesystem itself.
  • example contains a couple of directories for use in exploring BBFS.

Consulting

I'one thousand happy to answer whatsoever questions you may have regarding BBFS or FUSE in full general. Also, I am available for consulting on FUSE or other Linux organisation, or PIC microprocessor, development. If you're interested, send me an email at joseph@pfeifferfamily.internet

License

Creative Commons License
Writing a FUSE Filesystem: a Tutorial by Joseph J. Pfeiffer, Jr., PhD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike iii.0 Unported License.

The code found in src/bbfs.c is derived from the function prototypes constitute in /usr/include/fuse/fuse.h, which is licensed under the LGPLv2. My code is being released under the GPLv3. See the file src/COPYING


Last modified: Dominicus Feb iv 09:12:12 MST 2018

bartleyparehostom.blogspot.com

Source: https://www.cs.nmsu.edu/~pfeiffer/fuse-tutorial/

0 Response to "How to Read the Lables on Fuses"

Postar um comentário

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel