Commit fc01a377 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Export Original FS in Wrapping(Raw)FileSystem.

parent 279e23da
...@@ -13,7 +13,7 @@ var _ = fmt.Print ...@@ -13,7 +13,7 @@ var _ = fmt.Print
// TimingPathFilesystem is a wrapper to collect timings for a PathFilesystem // TimingPathFilesystem is a wrapper to collect timings for a PathFilesystem
type TimingPathFilesystem struct { type TimingPathFilesystem struct {
original PathFilesystem WrappingPathFilesystem
statisticsLock sync.Mutex statisticsLock sync.Mutex
latencies map[string]int64 latencies map[string]int64
...@@ -23,7 +23,7 @@ type TimingPathFilesystem struct { ...@@ -23,7 +23,7 @@ type TimingPathFilesystem struct {
func NewTimingPathFilesystem(fs PathFilesystem) *TimingPathFilesystem { func NewTimingPathFilesystem(fs PathFilesystem) *TimingPathFilesystem {
t := new(TimingPathFilesystem) t := new(TimingPathFilesystem)
t.original = fs t.Original = fs
t.latencies = make(map[string]int64) t.latencies = make(map[string]int64)
t.counts = make(map[string]int64) t.counts = make(map[string]int64)
t.pathCounts = make(map[string]map[string]int64) t.pathCounts = make(map[string]map[string]int64)
...@@ -88,115 +88,115 @@ func (me *TimingPathFilesystem) HotPaths(operation string) (paths []string, uniq ...@@ -88,115 +88,115 @@ func (me *TimingPathFilesystem) HotPaths(operation string) (paths []string, uniq
func (me *TimingPathFilesystem) GetAttr(name string) (*Attr, Status) { func (me *TimingPathFilesystem) GetAttr(name string) (*Attr, Status) {
defer me.startTimer("GetAttr", name)() defer me.startTimer("GetAttr", name)()
return me.original.GetAttr(name) return me.Original.GetAttr(name)
} }
func (me *TimingPathFilesystem) GetXAttr(name string, attr string) ([]byte, Status) { func (me *TimingPathFilesystem) GetXAttr(name string, attr string) ([]byte, Status) {
defer me.startTimer("GetXAttr", name)() defer me.startTimer("GetXAttr", name)()
return me.original.GetXAttr(name, attr) return me.Original.GetXAttr(name, attr)
} }
func (me *TimingPathFilesystem) SetXAttr(name string, attr string, data []byte, flags int) Status { func (me *TimingPathFilesystem) SetXAttr(name string, attr string, data []byte, flags int) Status {
defer me.startTimer("SetXAttr", name)() defer me.startTimer("SetXAttr", name)()
return me.original.SetXAttr(name, attr, data, flags) return me.Original.SetXAttr(name, attr, data, flags)
} }
func (me *TimingPathFilesystem) ListXAttr(name string) ([]string, Status) { func (me *TimingPathFilesystem) ListXAttr(name string) ([]string, Status) {
defer me.startTimer("ListXAttr", name)() defer me.startTimer("ListXAttr", name)()
return me.original.ListXAttr(name) return me.Original.ListXAttr(name)
} }
func (me *TimingPathFilesystem) RemoveXAttr(name string, attr string) Status { func (me *TimingPathFilesystem) RemoveXAttr(name string, attr string) Status {
defer me.startTimer("RemoveXAttr", name)() defer me.startTimer("RemoveXAttr", name)()
return me.original.RemoveXAttr(name, attr) return me.Original.RemoveXAttr(name, attr)
} }
func (me *TimingPathFilesystem) Readlink(name string) (string, Status) { func (me *TimingPathFilesystem) Readlink(name string) (string, Status) {
defer me.startTimer("Readlink", name)() defer me.startTimer("Readlink", name)()
return me.original.Readlink(name) return me.Original.Readlink(name)
} }
func (me *TimingPathFilesystem) Mknod(name string, mode uint32, dev uint32) Status { func (me *TimingPathFilesystem) Mknod(name string, mode uint32, dev uint32) Status {
defer me.startTimer("Mknod", name)() defer me.startTimer("Mknod", name)()
return me.original.Mknod(name, mode, dev) return me.Original.Mknod(name, mode, dev)
} }
func (me *TimingPathFilesystem) Mkdir(name string, mode uint32) Status { func (me *TimingPathFilesystem) Mkdir(name string, mode uint32) Status {
defer me.startTimer("Mkdir", name)() defer me.startTimer("Mkdir", name)()
return me.original.Mkdir(name, mode) return me.Original.Mkdir(name, mode)
} }
func (me *TimingPathFilesystem) Unlink(name string) (code Status) { func (me *TimingPathFilesystem) Unlink(name string) (code Status) {
defer me.startTimer("Unlink", name)() defer me.startTimer("Unlink", name)()
return me.original.Unlink(name) return me.Original.Unlink(name)
} }
func (me *TimingPathFilesystem) Rmdir(name string) (code Status) { func (me *TimingPathFilesystem) Rmdir(name string) (code Status) {
defer me.startTimer("Rmdir", name)() defer me.startTimer("Rmdir", name)()
return me.original.Rmdir(name) return me.Original.Rmdir(name)
} }
func (me *TimingPathFilesystem) Symlink(value string, linkName string) (code Status) { func (me *TimingPathFilesystem) Symlink(value string, linkName string) (code Status) {
defer me.startTimer("Symlink", linkName)() defer me.startTimer("Symlink", linkName)()
return me.original.Symlink(value, linkName) return me.Original.Symlink(value, linkName)
} }
func (me *TimingPathFilesystem) Rename(oldName string, newName string) (code Status) { func (me *TimingPathFilesystem) Rename(oldName string, newName string) (code Status) {
defer me.startTimer("Rename", oldName)() defer me.startTimer("Rename", oldName)()
return me.original.Rename(oldName, newName) return me.Original.Rename(oldName, newName)
} }
func (me *TimingPathFilesystem) Link(oldName string, newName string) (code Status) { func (me *TimingPathFilesystem) Link(oldName string, newName string) (code Status) {
defer me.startTimer("Link", newName)() defer me.startTimer("Link", newName)()
return me.original.Link(oldName, newName) return me.Original.Link(oldName, newName)
} }
func (me *TimingPathFilesystem) Chmod(name string, mode uint32) (code Status) { func (me *TimingPathFilesystem) Chmod(name string, mode uint32) (code Status) {
defer me.startTimer("Chmod", name)() defer me.startTimer("Chmod", name)()
return me.original.Chmod(name, mode) return me.Original.Chmod(name, mode)
} }
func (me *TimingPathFilesystem) Chown(name string, uid uint32, gid uint32) (code Status) { func (me *TimingPathFilesystem) Chown(name string, uid uint32, gid uint32) (code Status) {
defer me.startTimer("Chown", name)() defer me.startTimer("Chown", name)()
return me.original.Chown(name, uid, gid) return me.Original.Chown(name, uid, gid)
} }
func (me *TimingPathFilesystem) Truncate(name string, offset uint64) (code Status) { func (me *TimingPathFilesystem) Truncate(name string, offset uint64) (code Status) {
defer me.startTimer("Truncate", name)() defer me.startTimer("Truncate", name)()
return me.original.Truncate(name, offset) return me.Original.Truncate(name, offset)
} }
func (me *TimingPathFilesystem) Open(name string, flags uint32) (file RawFuseFile, code Status) { func (me *TimingPathFilesystem) Open(name string, flags uint32) (file RawFuseFile, code Status) {
defer me.startTimer("Open", name)() defer me.startTimer("Open", name)()
return me.original.Open(name, flags) return me.Original.Open(name, flags)
} }
func (me *TimingPathFilesystem) OpenDir(name string) (stream chan DirEntry, status Status) { func (me *TimingPathFilesystem) OpenDir(name string) (stream chan DirEntry, status Status) {
defer me.startTimer("OpenDir", name)() defer me.startTimer("OpenDir", name)()
return me.original.OpenDir(name) return me.Original.OpenDir(name)
} }
func (me *TimingPathFilesystem) Mount(conn *PathFileSystemConnector) Status { func (me *TimingPathFilesystem) Mount(conn *PathFileSystemConnector) Status {
defer me.startTimer("Mount", "")() defer me.startTimer("Mount", "")()
return me.original.Mount(conn) return me.Original.Mount(conn)
} }
func (me *TimingPathFilesystem) Unmount() { func (me *TimingPathFilesystem) Unmount() {
defer me.startTimer("Unmount", "")() defer me.startTimer("Unmount", "")()
me.original.Unmount() me.Original.Unmount()
} }
func (me *TimingPathFilesystem) Access(name string, mode uint32) (code Status) { func (me *TimingPathFilesystem) Access(name string, mode uint32) (code Status) {
defer me.startTimer("Access", name)() defer me.startTimer("Access", name)()
return me.original.Access(name, mode) return me.Original.Access(name, mode)
} }
func (me *TimingPathFilesystem) Create(name string, flags uint32, mode uint32) (file RawFuseFile, code Status) { func (me *TimingPathFilesystem) Create(name string, flags uint32, mode uint32) (file RawFuseFile, code Status) {
defer me.startTimer("Create", name)() defer me.startTimer("Create", name)()
return me.original.Create(name, flags, mode) return me.Original.Create(name, flags, mode)
} }
func (me *TimingPathFilesystem) Utimens(name string, AtimeNs uint64, CtimeNs uint64) (code Status) { func (me *TimingPathFilesystem) Utimens(name string, AtimeNs uint64, CtimeNs uint64) (code Status) {
defer me.startTimer("Utimens", name)() defer me.startTimer("Utimens", name)()
return me.original.Utimens(name, AtimeNs, CtimeNs) return me.Original.Utimens(name, AtimeNs, CtimeNs)
} }
...@@ -7,7 +7,7 @@ import ( ...@@ -7,7 +7,7 @@ import (
// TimingRawFilesystem is a wrapper to collect timings for a RawFilesystem // TimingRawFilesystem is a wrapper to collect timings for a RawFilesystem
type TimingRawFilesystem struct { type TimingRawFilesystem struct {
original RawFileSystem WrappingRawFilesystem
statisticsLock sync.Mutex statisticsLock sync.Mutex
latencies map[string]int64 latencies map[string]int64
...@@ -16,7 +16,7 @@ type TimingRawFilesystem struct { ...@@ -16,7 +16,7 @@ type TimingRawFilesystem struct {
func NewTimingRawFilesystem(fs RawFileSystem) *TimingRawFilesystem { func NewTimingRawFilesystem(fs RawFileSystem) *TimingRawFilesystem {
t := new(TimingRawFilesystem) t := new(TimingRawFilesystem)
t.original = fs t.Original = fs
t.latencies = make(map[string]int64) t.latencies = make(map[string]int64)
t.counts = make(map[string]int64) t.counts = make(map[string]int64)
return t return t
...@@ -48,135 +48,135 @@ func (me *TimingRawFilesystem) Latencies() map[string]float64 { ...@@ -48,135 +48,135 @@ func (me *TimingRawFilesystem) Latencies() map[string]float64 {
func (me *TimingRawFilesystem) Init(h *InHeader, input *InitIn) (*InitOut, Status) { func (me *TimingRawFilesystem) Init(h *InHeader, input *InitIn) (*InitOut, Status) {
defer me.startTimer("Init")() defer me.startTimer("Init")()
return me.original.Init(h, input) return me.Original.Init(h, input)
} }
func (me *TimingRawFilesystem) Destroy(h *InHeader, input *InitIn) { func (me *TimingRawFilesystem) Destroy(h *InHeader, input *InitIn) {
defer me.startTimer("Destroy")() defer me.startTimer("Destroy")()
me.original.Destroy(h, input) me.Original.Destroy(h, input)
} }
func (me *TimingRawFilesystem) Lookup(h *InHeader, name string) (out *EntryOut, code Status) { func (me *TimingRawFilesystem) Lookup(h *InHeader, name string) (out *EntryOut, code Status) {
defer me.startTimer("Lookup")() defer me.startTimer("Lookup")()
return me.original.Lookup(h, name) return me.Original.Lookup(h, name)
} }
func (me *TimingRawFilesystem) Forget(h *InHeader, input *ForgetIn) { func (me *TimingRawFilesystem) Forget(h *InHeader, input *ForgetIn) {
defer me.startTimer("Forget")() defer me.startTimer("Forget")()
me.original.Forget(h, input) me.Original.Forget(h, input)
} }
func (me *TimingRawFilesystem) GetAttr(header *InHeader, input *GetAttrIn) (out *AttrOut, code Status) { func (me *TimingRawFilesystem) GetAttr(header *InHeader, input *GetAttrIn) (out *AttrOut, code Status) {
defer me.startTimer("GetAttr")() defer me.startTimer("GetAttr")()
return me.original.GetAttr(header, input) return me.Original.GetAttr(header, input)
} }
func (me *TimingRawFilesystem) Open(header *InHeader, input *OpenIn) (flags uint32, fuseFile RawFuseFile, status Status) { func (me *TimingRawFilesystem) Open(header *InHeader, input *OpenIn) (flags uint32, fuseFile RawFuseFile, status Status) {
defer me.startTimer("Open")() defer me.startTimer("Open")()
return me.original.Open(header, input) return me.Original.Open(header, input)
} }
func (me *TimingRawFilesystem) SetAttr(header *InHeader, input *SetAttrIn) (out *AttrOut, code Status) { func (me *TimingRawFilesystem) SetAttr(header *InHeader, input *SetAttrIn) (out *AttrOut, code Status) {
defer me.startTimer("SetAttr")() defer me.startTimer("SetAttr")()
return me.original.SetAttr(header, input) return me.Original.SetAttr(header, input)
} }
func (me *TimingRawFilesystem) Readlink(header *InHeader) (out []byte, code Status) { func (me *TimingRawFilesystem) Readlink(header *InHeader) (out []byte, code Status) {
defer me.startTimer("Readlink")() defer me.startTimer("Readlink")()
return me.original.Readlink(header) return me.Original.Readlink(header)
} }
func (me *TimingRawFilesystem) Mknod(header *InHeader, input *MknodIn, name string) (out *EntryOut, code Status) { func (me *TimingRawFilesystem) Mknod(header *InHeader, input *MknodIn, name string) (out *EntryOut, code Status) {
defer me.startTimer("Mknod")() defer me.startTimer("Mknod")()
return me.original.Mknod(header, input, name) return me.Original.Mknod(header, input, name)
} }
func (me *TimingRawFilesystem) Mkdir(header *InHeader, input *MkdirIn, name string) (out *EntryOut, code Status) { func (me *TimingRawFilesystem) Mkdir(header *InHeader, input *MkdirIn, name string) (out *EntryOut, code Status) {
defer me.startTimer("Mkdir")() defer me.startTimer("Mkdir")()
return me.original.Mkdir(header, input, name) return me.Original.Mkdir(header, input, name)
} }
func (me *TimingRawFilesystem) Unlink(header *InHeader, name string) (code Status) { func (me *TimingRawFilesystem) Unlink(header *InHeader, name string) (code Status) {
defer me.startTimer("Unlink")() defer me.startTimer("Unlink")()
return me.original.Unlink(header, name) return me.Original.Unlink(header, name)
} }
func (me *TimingRawFilesystem) Rmdir(header *InHeader, name string) (code Status) { func (me *TimingRawFilesystem) Rmdir(header *InHeader, name string) (code Status) {
defer me.startTimer("Rmdir")() defer me.startTimer("Rmdir")()
return me.original.Rmdir(header, name) return me.Original.Rmdir(header, name)
} }
func (me *TimingRawFilesystem) Symlink(header *InHeader, pointedTo string, linkName string) (out *EntryOut, code Status) { func (me *TimingRawFilesystem) Symlink(header *InHeader, pointedTo string, linkName string) (out *EntryOut, code Status) {
defer me.startTimer("Symlink")() defer me.startTimer("Symlink")()
return me.original.Symlink(header, pointedTo, linkName) return me.Original.Symlink(header, pointedTo, linkName)
} }
func (me *TimingRawFilesystem) Rename(header *InHeader, input *RenameIn, oldName string, newName string) (code Status) { func (me *TimingRawFilesystem) Rename(header *InHeader, input *RenameIn, oldName string, newName string) (code Status) {
defer me.startTimer("Rename")() defer me.startTimer("Rename")()
return me.original.Rename(header, input, oldName, newName) return me.Original.Rename(header, input, oldName, newName)
} }
func (me *TimingRawFilesystem) Link(header *InHeader, input *LinkIn, name string) (out *EntryOut, code Status) { func (me *TimingRawFilesystem) Link(header *InHeader, input *LinkIn, name string) (out *EntryOut, code Status) {
defer me.startTimer("Link")() defer me.startTimer("Link")()
return me.original.Link(header, input, name) return me.Original.Link(header, input, name)
} }
func (me *TimingRawFilesystem) SetXAttr(header *InHeader, input *SetXAttrIn, attr string, data []byte) Status { func (me *TimingRawFilesystem) SetXAttr(header *InHeader, input *SetXAttrIn, attr string, data []byte) Status {
defer me.startTimer("SetXAttr")() defer me.startTimer("SetXAttr")()
return me.original.SetXAttr(header, input, attr, data) return me.Original.SetXAttr(header, input, attr, data)
} }
func (me *TimingRawFilesystem) GetXAttr(header *InHeader, attr string) (data []byte, code Status) { func (me *TimingRawFilesystem) GetXAttr(header *InHeader, attr string) (data []byte, code Status) {
defer me.startTimer("GetXAttr")() defer me.startTimer("GetXAttr")()
return me.original.GetXAttr(header, attr) return me.Original.GetXAttr(header, attr)
} }
func (me *TimingRawFilesystem) ListXAttr(header *InHeader) (data []byte, code Status) { func (me *TimingRawFilesystem) ListXAttr(header *InHeader) (data []byte, code Status) {
defer me.startTimer("ListXAttr")() defer me.startTimer("ListXAttr")()
return me.original.ListXAttr(header) return me.Original.ListXAttr(header)
} }
func (me *TimingRawFilesystem) RemoveXAttr(header *InHeader, attr string) Status { func (me *TimingRawFilesystem) RemoveXAttr(header *InHeader, attr string) Status {
defer me.startTimer("RemoveXAttr")() defer me.startTimer("RemoveXAttr")()
return me.original.RemoveXAttr(header, attr) return me.Original.RemoveXAttr(header, attr)
} }
func (me *TimingRawFilesystem) Access(header *InHeader, input *AccessIn) (code Status) { func (me *TimingRawFilesystem) Access(header *InHeader, input *AccessIn) (code Status) {
defer me.startTimer("Access")() defer me.startTimer("Access")()
return me.original.Access(header, input) return me.Original.Access(header, input)
} }
func (me *TimingRawFilesystem) Create(header *InHeader, input *CreateIn, name string) (flags uint32, fuseFile RawFuseFile, out *EntryOut, code Status) { func (me *TimingRawFilesystem) Create(header *InHeader, input *CreateIn, name string) (flags uint32, fuseFile RawFuseFile, out *EntryOut, code Status) {
defer me.startTimer("Create")() defer me.startTimer("Create")()
return me.original.Create(header, input, name) return me.Original.Create(header, input, name)
} }
func (me *TimingRawFilesystem) Bmap(header *InHeader, input *BmapIn) (out *BmapOut, code Status) { func (me *TimingRawFilesystem) Bmap(header *InHeader, input *BmapIn) (out *BmapOut, code Status) {
defer me.startTimer("Bmap")() defer me.startTimer("Bmap")()
return me.original.Bmap(header, input) return me.Original.Bmap(header, input)
} }
func (me *TimingRawFilesystem) Ioctl(header *InHeader, input *IoctlIn) (out *IoctlOut, code Status) { func (me *TimingRawFilesystem) Ioctl(header *InHeader, input *IoctlIn) (out *IoctlOut, code Status) {
defer me.startTimer("Ioctl")() defer me.startTimer("Ioctl")()
return me.original.Ioctl(header, input) return me.Original.Ioctl(header, input)
} }
func (me *TimingRawFilesystem) Poll(header *InHeader, input *PollIn) (out *PollOut, code Status) { func (me *TimingRawFilesystem) Poll(header *InHeader, input *PollIn) (out *PollOut, code Status) {
defer me.startTimer("Poll")() defer me.startTimer("Poll")()
return me.original.Poll(header, input) return me.Original.Poll(header, input)
} }
func (me *TimingRawFilesystem) OpenDir(header *InHeader, input *OpenIn) (flags uint32, fuseFile RawFuseDir, status Status) { func (me *TimingRawFilesystem) OpenDir(header *InHeader, input *OpenIn) (flags uint32, fuseFile RawFuseDir, status Status) {
defer me.startTimer("OpenDir")() defer me.startTimer("OpenDir")()
return me.original.OpenDir(header, input) return me.Original.OpenDir(header, input)
} }
func (me *TimingRawFilesystem) Release(header *InHeader, f RawFuseFile) { func (me *TimingRawFilesystem) Release(header *InHeader, f RawFuseFile) {
defer me.startTimer("Release")() defer me.startTimer("Release")()
me.original.Release(header, f) me.Original.Release(header, f)
} }
func (me *TimingRawFilesystem) ReleaseDir(header *InHeader, f RawFuseDir) { func (me *TimingRawFilesystem) ReleaseDir(header *InHeader, f RawFuseDir) {
defer me.startTimer("ReleaseDir")() defer me.startTimer("ReleaseDir")()
me.original.ReleaseDir(header, f) me.Original.ReleaseDir(header, f)
} }
package fuse package fuse
type WrappingPathFilesystem struct { type WrappingPathFilesystem struct {
original PathFilesystem // Should be public so people reusing can access the wrapped
// FS.
Original PathFilesystem
} }
func (me *WrappingPathFilesystem) GetAttr(name string) (*Attr, Status) { func (me *WrappingPathFilesystem) GetAttr(name string) (*Attr, Status) {
return me.original.GetAttr(name) return me.Original.GetAttr(name)
} }
func (me *WrappingPathFilesystem) Readlink(name string) (string, Status) { func (me *WrappingPathFilesystem) Readlink(name string) (string, Status) {
return me.original.Readlink(name) return me.Original.Readlink(name)
} }
func (me *WrappingPathFilesystem) Mknod(name string, mode uint32, dev uint32) Status { func (me *WrappingPathFilesystem) Mknod(name string, mode uint32, dev uint32) Status {
return me.original.Mknod(name, mode, dev) return me.Original.Mknod(name, mode, dev)
} }
func (me *WrappingPathFilesystem) Mkdir(name string, mode uint32) Status { func (me *WrappingPathFilesystem) Mkdir(name string, mode uint32) Status {
return me.original.Mkdir(name, mode) return me.Original.Mkdir(name, mode)
} }
func (me *WrappingPathFilesystem) Unlink(name string) (code Status) { func (me *WrappingPathFilesystem) Unlink(name string) (code Status) {
return me.original.Unlink(name) return me.Original.Unlink(name)
} }
func (me *WrappingPathFilesystem) Rmdir(name string) (code Status) { func (me *WrappingPathFilesystem) Rmdir(name string) (code Status) {
return me.original.Rmdir(name) return me.Original.Rmdir(name)
} }
func (me *WrappingPathFilesystem) Symlink(value string, linkName string) (code Status) { func (me *WrappingPathFilesystem) Symlink(value string, linkName string) (code Status) {
return me.original.Symlink(value, linkName) return me.Original.Symlink(value, linkName)
} }
func (me *WrappingPathFilesystem) Rename(oldName string, newName string) (code Status) { func (me *WrappingPathFilesystem) Rename(oldName string, newName string) (code Status) {
return me.original.Rename(oldName, newName) return me.Original.Rename(oldName, newName)
} }
func (me *WrappingPathFilesystem) Link(oldName string, newName string) (code Status) { func (me *WrappingPathFilesystem) Link(oldName string, newName string) (code Status) {
return me.original.Link(oldName, newName) return me.Original.Link(oldName, newName)
} }
func (me *WrappingPathFilesystem) Chmod(name string, mode uint32) (code Status) { func (me *WrappingPathFilesystem) Chmod(name string, mode uint32) (code Status) {
return me.original.Chmod(name, mode) return me.Original.Chmod(name, mode)
} }
func (me *WrappingPathFilesystem) Chown(name string, uid uint32, gid uint32) (code Status) { func (me *WrappingPathFilesystem) Chown(name string, uid uint32, gid uint32) (code Status) {
return me.original.Chown(name, uid, gid) return me.Original.Chown(name, uid, gid)
} }
func (me *WrappingPathFilesystem) Truncate(name string, offset uint64) (code Status) { func (me *WrappingPathFilesystem) Truncate(name string, offset uint64) (code Status) {
return me.original.Truncate(name, offset) return me.Original.Truncate(name, offset)
} }
func (me *WrappingPathFilesystem) Open(name string, flags uint32) (file RawFuseFile, code Status) { func (me *WrappingPathFilesystem) Open(name string, flags uint32) (file RawFuseFile, code Status) {
return me.original.Open(name, flags) return me.Original.Open(name, flags)
} }
func (me *WrappingPathFilesystem) OpenDir(name string) (stream chan DirEntry, status Status) { func (me *WrappingPathFilesystem) OpenDir(name string) (stream chan DirEntry, status Status) {
return me.original.OpenDir(name) return me.Original.OpenDir(name)
} }
func (me *WrappingPathFilesystem) Mount(conn *PathFileSystemConnector) Status { func (me *WrappingPathFilesystem) Mount(conn *PathFileSystemConnector) Status {
return me.original.Mount(conn) return me.Original.Mount(conn)
} }
func (me *WrappingPathFilesystem) Unmount() { func (me *WrappingPathFilesystem) Unmount() {
me.original.Unmount() me.Original.Unmount()
} }
func (me *WrappingPathFilesystem) Access(name string, mode uint32) (code Status) { func (me *WrappingPathFilesystem) Access(name string, mode uint32) (code Status) {
return me.original.Access(name, mode) return me.Original.Access(name, mode)
} }
func (me *WrappingPathFilesystem) Create(name string, flags uint32, mode uint32) (file RawFuseFile, code Status) { func (me *WrappingPathFilesystem) Create(name string, flags uint32, mode uint32) (file RawFuseFile, code Status) {
return me.original.Create(name, flags, mode) return me.Original.Create(name, flags, mode)
} }
func (me *WrappingPathFilesystem) Utimens(name string, AtimeNs uint64, CtimeNs uint64) (code Status) { func (me *WrappingPathFilesystem) Utimens(name string, AtimeNs uint64, CtimeNs uint64) (code Status) {
return me.original.Utimens(name, AtimeNs, CtimeNs) return me.Original.Utimens(name, AtimeNs, CtimeNs)
} }
func (me *WrappingPathFilesystem) GetXAttr(name string, attr string) ([]byte, Status) { func (me *WrappingPathFilesystem) GetXAttr(name string, attr string) ([]byte, Status) {
return me.original.GetXAttr(name, attr) return me.Original.GetXAttr(name, attr)
} }
func (me *WrappingPathFilesystem) ListXAttr(name string) ([]string, Status) { func (me *WrappingPathFilesystem) ListXAttr(name string) ([]string, Status) {
return me.original.ListXAttr(name) return me.Original.ListXAttr(name)
} }
func (me *WrappingPathFilesystem) RemoveXAttr(name string, attr string) Status { func (me *WrappingPathFilesystem) RemoveXAttr(name string, attr string) Status {
return me.original.RemoveXAttr(name, attr) return me.Original.RemoveXAttr(name, attr)
} }
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
// Wrapping raw FS. // Wrapping raw FS.
type WrappingRawFilesystem struct { type WrappingRawFilesystem struct {
original RawFileSystem Original RawFileSystem
} }
func (me *WrappingRawFilesystem) Init(h *InHeader, input *InitIn) (*InitOut, Status) { func (me *WrappingRawFilesystem) Init(h *InHeader, input *InitIn) (*InitOut, Status) {
return me.original.Init(h, input) return me.Original.Init(h, input)
} }
func (me *WrappingRawFilesystem) Destroy(h *InHeader, input *InitIn) { func (me *WrappingRawFilesystem) Destroy(h *InHeader, input *InitIn) {
me.original.Destroy(h, input) me.Original.Destroy(h, input)
} }
func (me *WrappingRawFilesystem) Lookup(h *InHeader, name string) (out *EntryOut, code Status) { func (me *WrappingRawFilesystem) Lookup(h *InHeader, name string) (out *EntryOut, code Status) {
return me.original.Lookup(h, name) return me.Original.Lookup(h, name)
} }
func (me *WrappingRawFilesystem) Forget(h *InHeader, input *ForgetIn) { func (me *WrappingRawFilesystem) Forget(h *InHeader, input *ForgetIn) {
me.original.Forget(h, input) me.Original.Forget(h, input)
} }
func (me *WrappingRawFilesystem) GetAttr(header *InHeader, input *GetAttrIn) (out *AttrOut, code Status) { func (me *WrappingRawFilesystem) GetAttr(header *InHeader, input *GetAttrIn) (out *AttrOut, code Status) {
return me.original.GetAttr(header, input) return me.Original.GetAttr(header, input)
} }
func (me *WrappingRawFilesystem) Open(header *InHeader, input *OpenIn) (flags uint32, fuseFile RawFuseFile, status Status) { func (me *WrappingRawFilesystem) Open(header *InHeader, input *OpenIn) (flags uint32, fuseFile RawFuseFile, status Status) {
return me.original.Open(header, input) return me.Original.Open(header, input)
} }
func (me *WrappingRawFilesystem) SetAttr(header *InHeader, input *SetAttrIn) (out *AttrOut, code Status) { func (me *WrappingRawFilesystem) SetAttr(header *InHeader, input *SetAttrIn) (out *AttrOut, code Status) {
return me.original.SetAttr(header, input) return me.Original.SetAttr(header, input)
} }
func (me *WrappingRawFilesystem) Readlink(header *InHeader) (out []byte, code Status) { func (me *WrappingRawFilesystem) Readlink(header *InHeader) (out []byte, code Status) {
return me.original.Readlink(header) return me.Original.Readlink(header)
} }
func (me *WrappingRawFilesystem) Mknod(header *InHeader, input *MknodIn, name string) (out *EntryOut, code Status) { func (me *WrappingRawFilesystem) Mknod(header *InHeader, input *MknodIn, name string) (out *EntryOut, code Status) {
return me.original.Mknod(header, input, name) return me.Original.Mknod(header, input, name)
} }
func (me *WrappingRawFilesystem) Mkdir(header *InHeader, input *MkdirIn, name string) (out *EntryOut, code Status) { func (me *WrappingRawFilesystem) Mkdir(header *InHeader, input *MkdirIn, name string) (out *EntryOut, code Status) {
return me.original.Mkdir(header, input, name) return me.Original.Mkdir(header, input, name)
} }
func (me *WrappingRawFilesystem) Unlink(header *InHeader, name string) (code Status) { func (me *WrappingRawFilesystem) Unlink(header *InHeader, name string) (code Status) {
return me.original.Unlink(header, name) return me.Original.Unlink(header, name)
} }
func (me *WrappingRawFilesystem) Rmdir(header *InHeader, name string) (code Status) { func (me *WrappingRawFilesystem) Rmdir(header *InHeader, name string) (code Status) {
return me.original.Rmdir(header, name) return me.Original.Rmdir(header, name)
} }
func (me *WrappingRawFilesystem) Symlink(header *InHeader, pointedTo string, linkName string) (out *EntryOut, code Status) { func (me *WrappingRawFilesystem) Symlink(header *InHeader, pointedTo string, linkName string) (out *EntryOut, code Status) {
return me.original.Symlink(header, pointedTo, linkName) return me.Original.Symlink(header, pointedTo, linkName)
} }
func (me *WrappingRawFilesystem) Rename(header *InHeader, input *RenameIn, oldName string, newName string) (code Status) { func (me *WrappingRawFilesystem) Rename(header *InHeader, input *RenameIn, oldName string, newName string) (code Status) {
return me.original.Rename(header, input, oldName, newName) return me.Original.Rename(header, input, oldName, newName)
} }
func (me *WrappingRawFilesystem) Link(header *InHeader, input *LinkIn, name string) (out *EntryOut, code Status) { func (me *WrappingRawFilesystem) Link(header *InHeader, input *LinkIn, name string) (out *EntryOut, code Status) {
return me.original.Link(header, input, name) return me.Original.Link(header, input, name)
} }
func (me *WrappingRawFilesystem) SetXAttr(header *InHeader, input *SetXAttrIn, attr string, data []byte) Status { func (me *WrappingRawFilesystem) SetXAttr(header *InHeader, input *SetXAttrIn, attr string, data []byte) Status {
return me.original.SetXAttr(header, input, attr, data) return me.Original.SetXAttr(header, input, attr, data)
} }
func (me *WrappingRawFilesystem) GetXAttr(header *InHeader, attr string) (data []byte, code Status) { func (me *WrappingRawFilesystem) GetXAttr(header *InHeader, attr string) (data []byte, code Status) {
return me.original.GetXAttr(header, attr) return me.Original.GetXAttr(header, attr)
} }
func (me *WrappingRawFilesystem) ListXAttr(header *InHeader) (data []byte, code Status) { func (me *WrappingRawFilesystem) ListXAttr(header *InHeader) (data []byte, code Status) {
return me.original.ListXAttr(header) return me.Original.ListXAttr(header)
} }
func (me *WrappingRawFilesystem) RemoveXAttr(header *InHeader, attr string) Status { func (me *WrappingRawFilesystem) RemoveXAttr(header *InHeader, attr string) Status {
return me.original.RemoveXAttr(header, attr) return me.Original.RemoveXAttr(header, attr)
} }
func (me *WrappingRawFilesystem) Access(header *InHeader, input *AccessIn) (code Status) { func (me *WrappingRawFilesystem) Access(header *InHeader, input *AccessIn) (code Status) {
return me.original.Access(header, input) return me.Original.Access(header, input)
} }
func (me *WrappingRawFilesystem) Create(header *InHeader, input *CreateIn, name string) (flags uint32, fuseFile RawFuseFile, out *EntryOut, code Status) { func (me *WrappingRawFilesystem) Create(header *InHeader, input *CreateIn, name string) (flags uint32, fuseFile RawFuseFile, out *EntryOut, code Status) {
return me.original.Create(header, input, name) return me.Original.Create(header, input, name)
} }
func (me *WrappingRawFilesystem) Bmap(header *InHeader, input *BmapIn) (out *BmapOut, code Status) { func (me *WrappingRawFilesystem) Bmap(header *InHeader, input *BmapIn) (out *BmapOut, code Status) {
return me.original.Bmap(header, input) return me.Original.Bmap(header, input)
} }
func (me *WrappingRawFilesystem) Ioctl(header *InHeader, input *IoctlIn) (out *IoctlOut, code Status) { func (me *WrappingRawFilesystem) Ioctl(header *InHeader, input *IoctlIn) (out *IoctlOut, code Status) {
return me.original.Ioctl(header, input) return me.Original.Ioctl(header, input)
} }
func (me *WrappingRawFilesystem) Poll(header *InHeader, input *PollIn) (out *PollOut, code Status) { func (me *WrappingRawFilesystem) Poll(header *InHeader, input *PollIn) (out *PollOut, code Status) {
return me.original.Poll(header, input) return me.Original.Poll(header, input)
} }
func (me *WrappingRawFilesystem) OpenDir(header *InHeader, input *OpenIn) (flags uint32, fuseFile RawFuseDir, status Status) { func (me *WrappingRawFilesystem) OpenDir(header *InHeader, input *OpenIn) (flags uint32, fuseFile RawFuseDir, status Status) {
return me.original.OpenDir(header, input) return me.Original.OpenDir(header, input)
} }
func (me *WrappingRawFilesystem) Release(header *InHeader, f RawFuseFile) { func (me *WrappingRawFilesystem) Release(header *InHeader, f RawFuseFile) {
me.original.Release(header, f) me.Original.Release(header, f)
} }
func (me *WrappingRawFilesystem) ReleaseDir(header *InHeader, f RawFuseDir) { func (me *WrappingRawFilesystem) ReleaseDir(header *InHeader, f RawFuseDir) {
me.original.ReleaseDir(header, f) me.Original.ReleaseDir(header, f)
} }
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