Commit 6d31d546 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Misc. polish.

parent b5c23b50
...@@ -5,7 +5,7 @@ GO-FUSE: native bindings for the FUSE kernel module. ...@@ -5,7 +5,7 @@ GO-FUSE: native bindings for the FUSE kernel module.
HIGHLIGHTS HIGHLIGHTS
* High speed: less than 50% slower than libfuse, using the gc * High speed: less than 50% slower than libfuse, using the gc
compiler. Most real world applications, the difference will be compiler. For most real world applications, the difference will be
negligible. negligible.
* Supports in-process mounting of different FileSystems onto * Supports in-process mounting of different FileSystems onto
...@@ -71,7 +71,7 @@ src.zip (7000 files). ...@@ -71,7 +71,7 @@ src.zip (7000 files).
platform libfuse Go-FUSE difference (%) platform libfuse Go-FUSE difference (%)
lenovo T60 (2cpu) 83us 99us 19% Lenovo T60 (2cpu) 83us 99us 19%
Lenovo T400 (2cpu) 38us 58us 52% Lenovo T400 (2cpu) 38us 58us 52%
DellT3500/Lucid (2cpu) 34us(*) 35us 3% DellT3500/Lucid (2cpu) 34us(*) 35us 3%
DellT3500/Lucid (6cpu) 59us 76us 28% DellT3500/Lucid (6cpu) 59us 76us 28%
...@@ -99,7 +99,8 @@ Grep source code for TODO. Major topics: ...@@ -99,7 +99,8 @@ Grep source code for TODO. Major topics:
* Missing support for file locking: FUSE_GETLK, FUSE_SETLK, FUSE_SETLKW * Missing support for file locking: FUSE_GETLK, FUSE_SETLK, FUSE_SETLKW
* Missing support for FUSE_INTERRUPT, FUSE_NOTIFY, CUSE, BMAP, POLL, IOCTL, STATFS * Missing support for FUSE_INTERRUPT, FUSE_NOTIFY, CUSE, BMAP, POLL,
IOCTL, STATFS
LICENSE LICENSE
......
...@@ -2,12 +2,12 @@ package fuse ...@@ -2,12 +2,12 @@ package fuse
/* /*
PathFilesystemConnector is a lowlevel FUSE filesystem that translates FilesystemConnector is a lowlevel FUSE filesystem that translates
from inode numbers (as delivered by the kernel) to traditional path from inode numbers (as delivered by the kernel) to traditional path
names. The paths are then used as arguments for methods of names. The paths are then used as arguments for methods of
PathFilesystem instances. FileSystem instances.
PathFilesystemConnector supports mounts of different PathFilesystem FileSystemConnector supports mounts of different FileSystems
on top of each other's directories. on top of each other's directories.
General todos: General todos:
......
...@@ -64,7 +64,6 @@ const ( ...@@ -64,7 +64,6 @@ const (
FUSE_NOTIFY_CODE_MAX = 4 FUSE_NOTIFY_CODE_MAX = 4
) )
// Ugh - we should fold ns and secs together here.
type Attr struct { type Attr struct {
Ino uint64 Ino uint64
Size uint64 Size uint64
......
...@@ -37,7 +37,7 @@ type openResponse struct { ...@@ -37,7 +37,7 @@ type openResponse struct {
fuse.Status fuse.Status
} }
// Caches readdir and getattr() // Caches filesystem metadata.
type CachingFileSystem struct { type CachingFileSystem struct {
fuse.FileSystem fuse.FileSystem
......
...@@ -43,8 +43,8 @@ func filePathHash(path string) string { ...@@ -43,8 +43,8 @@ func filePathHash(path string) string {
Implementation notes. Implementation notes.
* It piggybacks on the existing LoopbackFileSystem in Go-FUSE, so we * It overlays arbitrary writable FileSystems with any number of
don't have to translate back and forth between Go's and FUSE's API. readonly FileSystems.
* Deleting a file will put a file named * Deleting a file will put a file named
/DELETIONS/HASH-OF-FULL-FILENAME into the writable overlay, /DELETIONS/HASH-OF-FULL-FILENAME into the writable overlay,
......
...@@ -25,7 +25,6 @@ func HeaderToFileInfo(h *tar.Header) *os.FileInfo { ...@@ -25,7 +25,6 @@ func HeaderToFileInfo(h *tar.Header) *os.FileInfo {
Gid: h.Gid, Gid: h.Gid,
Size: h.Size, Size: h.Size,
Mtime_ns: h.Mtime, Mtime_ns: h.Mtime,
//Linkname: h.Linkname ,
Atime_ns: h.Atime, Atime_ns: h.Atime,
Ctime_ns: h.Ctime, Ctime_ns: h.Ctime,
} }
...@@ -74,6 +73,7 @@ func NewTarTree(r io.Reader) *MemTree { ...@@ -74,6 +73,7 @@ func NewTarTree(r io.Reader) *MemTree {
hdr.Name = *longName hdr.Name = *longName
longName = nil longName = nil
} }
comps := strings.Split(filepath.Clean(hdr.Name), "/", -1) comps := strings.Split(filepath.Clean(hdr.Name), "/", -1)
base := "" base := ""
if !strings.HasSuffix(hdr.Name, "/") { if !strings.HasSuffix(hdr.Name, "/") {
......
...@@ -70,8 +70,7 @@ func zipFilesToTree(files []*zip.File) *MemTree { ...@@ -70,8 +70,7 @@ func zipFilesToTree(files []*zip.File) *MemTree {
} }
// NewZipArchiveFileSystem creates a new file-system for the // NewZipTree creates a new file-system for the zip file named name.
// zip file named name.
func NewZipTree(name string) (*MemTree, os.Error) { func NewZipTree(name string) (*MemTree, os.Error) {
r, err := zip.OpenReader(name) r, err := zip.OpenReader(name)
if err != nil { if err != nil {
......
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