Giter VIP home page Giter VIP logo

nullfs's Introduction

OVERVIEW

nullfs is FUSE filesystem driver which discards
all files' data written to it.

Reading from any nullfs file returns EOF.

Regarding directories, different strategies
exist and several implementations ar provided
(see below). 

DETAILED DESCRIPTION

Proper implementation requires nullfs driver to
store metadata for files, directories and special
files (devices/sockets/fifos), and this may not be
desirable in some cases because of memory
footprint.

Therefore 3 implementations are to be provided:

1. nul1fs

nul1fs implements flat filesystem without support
for directories except the "/" one. Readdir (ls)
show only "." and ".." entries in "/".

Any file can be created, read or written, because
lookup for any filename returns TRUE and reports
root:root owner and 0666 permissions.

Building and mounting:

g++ -Wall -o nullfs nullfs.c++ `pkg-config fuse --cflags --libs`

Using:

  xrgtn@xrgtn-q40:~/jff/nullfs$ ls -al ./mnt
  total 4
  drwxrwxrwx 2 root  root     0 2010-08-12 12:09 .
  drwxr-xr-x 3 xrgtn xrgtn 4096 2010-08-12 12:09 ..
  xrgtn@xrgtn-q40:~/jff/nullfs$ echo foo > ./mnt/bar
  xrgtn@xrgtn-q40:~/jff/nullfs$ cat ./mnt/bar
  xrgtn@xrgtn-q40:~/jff/nullfs$ cat ./mnt/foo
  xrgtn@xrgtn-q40:~/jff/nullfs$ ls -l ./mnt/baz
  -rw-rw-rw- 1 root root 0 2010-08-12 12:10 ./mnt/baz
  xrgtn@xrgtn-q40:~/jff/nullfs$ 

2. nulnfs

nulnfs implements nullfs with limited number of
available inodes. When upper limit is reached,
old inodes are forgotten if possible (here's
example when forgetting is impossible:
cd /tmp/nullfs/ ; while mkdir d ; do cd d ; done).
If nulnfs cannot free some inodes, it returns
ENOSPC in response to mkdir/mknod/create.

NOTE: nulnfs hasn't been finished yet (it crashes
on use) and I have no plans to continue working on
it at the moment. But two other implementations
(minimalistic nul1fs one and C++ nullfs) work just
fine as advertised.

3. nullfs

nullfs permits to create files/directories until
it gets OOM killed or malloc()/new() stop working
(in the later case ot responds with ENOMEM).

nullfs's People

Contributors

listx avatar xrgtn avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.