Commit 14c30156 authored by Xiaoyi's avatar Xiaoyi Committed by Han-Wen Nienhuys

Update and rename README to README.md

Markdown-ify README
parent 66de2f17
# GO-FUSE
GO-FUSE: native bindings for the FUSE kernel module. native bindings for the FUSE kernel module.
## Highlights
HIGHLIGHTS
* High speed: as fast as libfuse using the gc compiler for single * High speed: as fast as libfuse using the gc compiler for single
threaded loads. threaded loads.
...@@ -11,9 +11,9 @@ threaded loads. ...@@ -11,9 +11,9 @@ threaded loads.
subdirectories of the FUSE mount. subdirectories of the FUSE mount.
* Supports 3 interfaces for writing filesystems: * Supports 3 interfaces for writing filesystems:
- PathFileSystem: define filesystems in terms path names. - `PathFileSystem`: define filesystems in terms path names.
- NodeFileSystem: define filesystems in terms of inodes. - `NodeFileSystem`: define filesystems in terms of inodes.
- RawFileSystem: define filesystems in terms of FUSE's raw - `RawFileSystem`: define filesystems in terms of FUSE's raw
wire protocol. wire protocol.
* Both NodeFileSystem and PathFileSystem support manipulation of true * Both NodeFileSystem and PathFileSystem support manipulation of true
...@@ -22,43 +22,49 @@ subdirectories of the FUSE mount. ...@@ -22,43 +22,49 @@ subdirectories of the FUSE mount.
* Includes two fleshed out examples, zipfs and unionfs. * Includes two fleshed out examples, zipfs and unionfs.
EXAMPLES ## Examples
* example/hello/main.go contains a 60-line "hello world" filesystem * `example/hello/main.go` contains a 60-line "hello world" filesystem
* zipfs/zipfs.go contains a small and simple read-only filesystem for * `zipfs/zipfs.go` contains a small and simple read-only filesystem for
zip and tar files. The corresponding command is in example/zipfs/ zip and tar files. The corresponding command is in example/zipfs/
For example, For example,
```shell
mkdir /tmp/mountpoint mkdir /tmp/mountpoint
example/zipfs/zipfs /tmp/mountpoint file.zip & example/zipfs/zipfs /tmp/mountpoint file.zip &
ls /tmp/mountpoint ls /tmp/mountpoint
fusermount -u /tmp/mountpoint fusermount -u /tmp/mountpoint
````
* zipfs/multizipfs.go shows how to use in-process mounts to * `zipfs/multizipfs.go` shows how to use in-process mounts to
combine multiple Go-FUSE filesystems into a larger filesystem. combine multiple Go-FUSE filesystems into a larger filesystem.
* fuse/loopback.go mounts another piece of the filesystem. * `fuse/loopback.go` mounts another piece of the filesystem.
Functionally, it is similar to a symlink. A binary to run is in Functionally, it is similar to a symlink. A binary to run is in
example/loopback/ . For example example/loopback/ . For example
```shell
mkdir /tmp/mountpoint mkdir /tmp/mountpoint
example/loopback/loopback -debug /tmp/mountpoint /some/other/directory & example/loopback/loopback -debug /tmp/mountpoint /some/other/directory &
ls /tmp/mountpoint ls /tmp/mountpoint
fusermount -u /tmp/mountpoint fusermount -u /tmp/mountpoint
```
* unionfs/unionfs.go: implements a union mount using 1 R/W branch, and * `unionfs/unionfs.go`: implements a union mount using 1 R/W branch, and
multiple R/O branches. multiple R/O branches.
```shell
mkdir -p /tmp/mountpoint /tmp/writable mkdir -p /tmp/mountpoint /tmp/writable
example/unionfs/unionfs /tmp/mountpoint /tmp/writable /usr & example/unionfs/unionfs /tmp/mountpoint /tmp/writable /usr &
ls /tmp/mountpoint ls /tmp/mountpoint
ls -l /tmp/mountpoint/bin/vi ls -l /tmp/mountpoint/bin/vi
rm /tmp/mountpoint/bin/vi rm /tmp/mountpoint/bin/vi
ls -l /tmp/mountpoint/bin/vi ls -l /tmp/mountpoint/bin/vi
cat /tmp/writable/*DELETION*/* cat /tmp/writable/DELETION/*
```
* union/autounionfs.go: creates UnionFs mounts automatically based on * `union/autounionfs.go`: creates UnionFs mounts automatically based on
existence of READONLY symlinks. existence of READONLY symlinks.
...@@ -68,7 +74,7 @@ Tested on: ...@@ -68,7 +74,7 @@ Tested on:
- x86 64bits (Ubuntu Lucid). - x86 64bits (Ubuntu Lucid).
BENCHMARKS ## Benchmarks
We use threaded stats over a read-only filesystem for benchmarking. We use threaded stats over a read-only filesystem for benchmarking.
Automated code is under benchmark/ directory. A simple C version of Automated code is under benchmark/ directory. A simple C version of
...@@ -89,9 +95,7 @@ On T60, for each file we have ...@@ -89,9 +95,7 @@ On T60, for each file we have
- 16.5us is due to latency measurements. - 16.5us is due to latency measurements.
- 3us is due to garbage collection. - 3us is due to garbage collection.
## macOS Support
MACOS SUPPORT
go-fuse works somewhat on OSX. Known limitations: go-fuse works somewhat on OSX. Known limitations:
...@@ -106,33 +110,29 @@ go-fuse works somewhat on OSX. Known limitations: ...@@ -106,33 +110,29 @@ go-fuse works somewhat on OSX. Known limitations:
* Tests are expected to pass; report any failure as a bug! * Tests are expected to pass; report any failure as a bug!
## Credits
CREDITS
* Inspired by Taru Karttunen's package, https://bitbucket.org/taruti/go-extra. * Inspired by Taru Karttunen's package, https://bitbucket.org/taruti/go-extra.
* Originally based on Ivan Krasin's https://github.com/krasin/go-fuse-zip * Originally based on Ivan Krasin's https://github.com/krasin/go-fuse-zip
## Bugs
BUGS
Yes, probably. Report them through Yes, probably. Report them through
https://github.com/hanwen/go-fuse/issues https://github.com/hanwen/go-fuse/issues
## Disclaimer
DISCLAIMER
This is not an official Google product. This is not an official Google product.
## Known Problems
KNOWN PROBLEMS
Grep source code for TODO. Major topics: Grep source code for TODO. Major topics:
* Missing support for network FS file locking: FUSE_GETLK, FUSE_SETLK, * Missing support for network FS file locking: `FUSE_GETLK`, `FUSE_SETLK`,
FUSE_SETLKW `FUSE_SETLKW`
* Missing support for FUSE_INTERRUPT, CUSE, BMAP, IOCTL * Missing support for `FUSE_INTERRUPT`, `CUSE`, `BMAP`, `IOCTL`
* In the path API, renames are racy; See also: * In the path API, renames are racy; See also:
...@@ -140,8 +140,7 @@ Grep source code for TODO. Major topics: ...@@ -140,8 +140,7 @@ Grep source code for TODO. Major topics:
Don't use the path API if you care about correctness. Don't use the path API if you care about correctness.
## License
LICENSE
Like Go, this library is distributed under the new BSD license. See Like Go, this library is distributed under the new BSD license. See
accompanying LICENSE file. accompanying LICENSE file.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment