Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Levin Zimmermann
go-fuse
Commits
fc01a377
Commit
fc01a377
authored
Mar 25, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Export Original FS in Wrapping(Raw)FileSystem.
parent
279e23da
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
107 additions
and
105 deletions
+107
-105
fuse/timingfs.go
fuse/timingfs.go
+25
-25
fuse/timingrawfs.go
fuse/timingrawfs.go
+29
-29
fuse/wrappedfs.go
fuse/wrappedfs.go
+53
-51
No files found.
fuse/timingfs.go
View file @
fc01a377
...
@@ -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
Wrapping
PathFilesystem
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
.
o
riginal
=
fs
t
.
O
riginal
=
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
.
o
riginal
.
GetAttr
(
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
GetXAttr
(
name
,
attr
)
return
me
.
O
riginal
.
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
.
o
riginal
.
SetXAttr
(
name
,
attr
,
data
,
flags
)
return
me
.
O
riginal
.
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
.
o
riginal
.
ListXAttr
(
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
RemoveXAttr
(
name
,
attr
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Readlink
(
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Mknod
(
name
,
mode
,
dev
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Mkdir
(
name
,
mode
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Unlink
(
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Rmdir
(
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Symlink
(
value
,
linkName
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Rename
(
oldName
,
newName
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Link
(
oldName
,
newName
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Chmod
(
name
,
mode
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Chown
(
name
,
uid
,
gid
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Truncate
(
name
,
offset
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Open
(
name
,
flags
)
return
me
.
O
riginal
.
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
.
o
riginal
.
OpenDir
(
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Mount
(
conn
)
return
me
.
O
riginal
.
Mount
(
conn
)
}
}
func
(
me
*
TimingPathFilesystem
)
Unmount
()
{
func
(
me
*
TimingPathFilesystem
)
Unmount
()
{
defer
me
.
startTimer
(
"Unmount"
,
""
)()
defer
me
.
startTimer
(
"Unmount"
,
""
)()
me
.
o
riginal
.
Unmount
()
me
.
O
riginal
.
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
.
o
riginal
.
Access
(
name
,
mode
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Create
(
name
,
flags
,
mode
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Utimens
(
name
,
AtimeNs
,
CtimeNs
)
return
me
.
O
riginal
.
Utimens
(
name
,
AtimeNs
,
CtimeNs
)
}
}
fuse/timingrawfs.go
View file @
fc01a377
...
@@ -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
RawFileS
ystem
WrappingRawFiles
ystem
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
.
o
riginal
=
fs
t
.
O
riginal
=
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
.
o
riginal
.
Init
(
h
,
input
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Destroy
(
h
,
input
)
me
.
O
riginal
.
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
.
o
riginal
.
Lookup
(
h
,
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Forget
(
h
,
input
)
me
.
O
riginal
.
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
.
o
riginal
.
GetAttr
(
header
,
input
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Open
(
header
,
input
)
return
me
.
O
riginal
.
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
.
o
riginal
.
SetAttr
(
header
,
input
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Readlink
(
header
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Mknod
(
header
,
input
,
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Mkdir
(
header
,
input
,
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Unlink
(
header
,
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Rmdir
(
header
,
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Symlink
(
header
,
pointedTo
,
linkName
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Rename
(
header
,
input
,
oldName
,
newName
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Link
(
header
,
input
,
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
SetXAttr
(
header
,
input
,
attr
,
data
)
return
me
.
O
riginal
.
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
.
o
riginal
.
GetXAttr
(
header
,
attr
)
return
me
.
O
riginal
.
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
.
o
riginal
.
ListXAttr
(
header
)
return
me
.
O
riginal
.
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
.
o
riginal
.
RemoveXAttr
(
header
,
attr
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Access
(
header
,
input
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Create
(
header
,
input
,
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Bmap
(
header
,
input
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Ioctl
(
header
,
input
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Poll
(
header
,
input
)
return
me
.
O
riginal
.
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
.
o
riginal
.
OpenDir
(
header
,
input
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Release
(
header
,
f
)
me
.
O
riginal
.
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
.
o
riginal
.
ReleaseDir
(
header
,
f
)
me
.
O
riginal
.
ReleaseDir
(
header
,
f
)
}
}
fuse/wrappedfs.go
View file @
fc01a377
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
.
o
riginal
.
GetAttr
(
name
)
return
me
.
O
riginal
.
GetAttr
(
name
)
}
}
func
(
me
*
WrappingPathFilesystem
)
Readlink
(
name
string
)
(
string
,
Status
)
{
func
(
me
*
WrappingPathFilesystem
)
Readlink
(
name
string
)
(
string
,
Status
)
{
return
me
.
o
riginal
.
Readlink
(
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Mknod
(
name
,
mode
,
dev
)
return
me
.
O
riginal
.
Mknod
(
name
,
mode
,
dev
)
}
}
func
(
me
*
WrappingPathFilesystem
)
Mkdir
(
name
string
,
mode
uint32
)
Status
{
func
(
me
*
WrappingPathFilesystem
)
Mkdir
(
name
string
,
mode
uint32
)
Status
{
return
me
.
o
riginal
.
Mkdir
(
name
,
mode
)
return
me
.
O
riginal
.
Mkdir
(
name
,
mode
)
}
}
func
(
me
*
WrappingPathFilesystem
)
Unlink
(
name
string
)
(
code
Status
)
{
func
(
me
*
WrappingPathFilesystem
)
Unlink
(
name
string
)
(
code
Status
)
{
return
me
.
o
riginal
.
Unlink
(
name
)
return
me
.
O
riginal
.
Unlink
(
name
)
}
}
func
(
me
*
WrappingPathFilesystem
)
Rmdir
(
name
string
)
(
code
Status
)
{
func
(
me
*
WrappingPathFilesystem
)
Rmdir
(
name
string
)
(
code
Status
)
{
return
me
.
o
riginal
.
Rmdir
(
name
)
return
me
.
O
riginal
.
Rmdir
(
name
)
}
}
func
(
me
*
WrappingPathFilesystem
)
Symlink
(
value
string
,
linkName
string
)
(
code
Status
)
{
func
(
me
*
WrappingPathFilesystem
)
Symlink
(
value
string
,
linkName
string
)
(
code
Status
)
{
return
me
.
o
riginal
.
Symlink
(
value
,
linkName
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Rename
(
oldName
,
newName
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Link
(
oldName
,
newName
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Chmod
(
name
,
mode
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Chown
(
name
,
uid
,
gid
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Truncate
(
name
,
offset
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Open
(
name
,
flags
)
return
me
.
O
riginal
.
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
.
o
riginal
.
OpenDir
(
name
)
return
me
.
O
riginal
.
OpenDir
(
name
)
}
}
func
(
me
*
WrappingPathFilesystem
)
Mount
(
conn
*
PathFileSystemConnector
)
Status
{
func
(
me
*
WrappingPathFilesystem
)
Mount
(
conn
*
PathFileSystemConnector
)
Status
{
return
me
.
o
riginal
.
Mount
(
conn
)
return
me
.
O
riginal
.
Mount
(
conn
)
}
}
func
(
me
*
WrappingPathFilesystem
)
Unmount
()
{
func
(
me
*
WrappingPathFilesystem
)
Unmount
()
{
me
.
o
riginal
.
Unmount
()
me
.
O
riginal
.
Unmount
()
}
}
func
(
me
*
WrappingPathFilesystem
)
Access
(
name
string
,
mode
uint32
)
(
code
Status
)
{
func
(
me
*
WrappingPathFilesystem
)
Access
(
name
string
,
mode
uint32
)
(
code
Status
)
{
return
me
.
o
riginal
.
Access
(
name
,
mode
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Create
(
name
,
flags
,
mode
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Utimens
(
name
,
AtimeNs
,
CtimeNs
)
return
me
.
O
riginal
.
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
.
o
riginal
.
GetXAttr
(
name
,
attr
)
return
me
.
O
riginal
.
GetXAttr
(
name
,
attr
)
}
}
func
(
me
*
WrappingPathFilesystem
)
ListXAttr
(
name
string
)
([]
string
,
Status
)
{
func
(
me
*
WrappingPathFilesystem
)
ListXAttr
(
name
string
)
([]
string
,
Status
)
{
return
me
.
o
riginal
.
ListXAttr
(
name
)
return
me
.
O
riginal
.
ListXAttr
(
name
)
}
}
func
(
me
*
WrappingPathFilesystem
)
RemoveXAttr
(
name
string
,
attr
string
)
Status
{
func
(
me
*
WrappingPathFilesystem
)
RemoveXAttr
(
name
string
,
attr
string
)
Status
{
return
me
.
o
riginal
.
RemoveXAttr
(
name
,
attr
)
return
me
.
O
riginal
.
RemoveXAttr
(
name
,
attr
)
}
}
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
// Wrapping raw FS.
// Wrapping raw FS.
type
WrappingRawFilesystem
struct
{
type
WrappingRawFilesystem
struct
{
o
riginal
RawFileSystem
O
riginal
RawFileSystem
}
}
func
(
me
*
WrappingRawFilesystem
)
Init
(
h
*
InHeader
,
input
*
InitIn
)
(
*
InitOut
,
Status
)
{
func
(
me
*
WrappingRawFilesystem
)
Init
(
h
*
InHeader
,
input
*
InitIn
)
(
*
InitOut
,
Status
)
{
return
me
.
o
riginal
.
Init
(
h
,
input
)
return
me
.
O
riginal
.
Init
(
h
,
input
)
}
}
func
(
me
*
WrappingRawFilesystem
)
Destroy
(
h
*
InHeader
,
input
*
InitIn
)
{
func
(
me
*
WrappingRawFilesystem
)
Destroy
(
h
*
InHeader
,
input
*
InitIn
)
{
me
.
o
riginal
.
Destroy
(
h
,
input
)
me
.
O
riginal
.
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
.
o
riginal
.
Lookup
(
h
,
name
)
return
me
.
O
riginal
.
Lookup
(
h
,
name
)
}
}
func
(
me
*
WrappingRawFilesystem
)
Forget
(
h
*
InHeader
,
input
*
ForgetIn
)
{
func
(
me
*
WrappingRawFilesystem
)
Forget
(
h
*
InHeader
,
input
*
ForgetIn
)
{
me
.
o
riginal
.
Forget
(
h
,
input
)
me
.
O
riginal
.
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
.
o
riginal
.
GetAttr
(
header
,
input
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Open
(
header
,
input
)
return
me
.
O
riginal
.
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
.
o
riginal
.
SetAttr
(
header
,
input
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Readlink
(
header
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Mknod
(
header
,
input
,
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Mkdir
(
header
,
input
,
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Unlink
(
header
,
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Rmdir
(
header
,
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Symlink
(
header
,
pointedTo
,
linkName
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Rename
(
header
,
input
,
oldName
,
newName
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Link
(
header
,
input
,
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
SetXAttr
(
header
,
input
,
attr
,
data
)
return
me
.
O
riginal
.
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
.
o
riginal
.
GetXAttr
(
header
,
attr
)
return
me
.
O
riginal
.
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
.
o
riginal
.
ListXAttr
(
header
)
return
me
.
O
riginal
.
ListXAttr
(
header
)
}
}
func
(
me
*
WrappingRawFilesystem
)
RemoveXAttr
(
header
*
InHeader
,
attr
string
)
Status
{
func
(
me
*
WrappingRawFilesystem
)
RemoveXAttr
(
header
*
InHeader
,
attr
string
)
Status
{
return
me
.
o
riginal
.
RemoveXAttr
(
header
,
attr
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Access
(
header
,
input
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Create
(
header
,
input
,
name
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Bmap
(
header
,
input
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Ioctl
(
header
,
input
)
return
me
.
O
riginal
.
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
.
o
riginal
.
Poll
(
header
,
input
)
return
me
.
O
riginal
.
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
.
o
riginal
.
OpenDir
(
header
,
input
)
return
me
.
O
riginal
.
OpenDir
(
header
,
input
)
}
}
func
(
me
*
WrappingRawFilesystem
)
Release
(
header
*
InHeader
,
f
RawFuseFile
)
{
func
(
me
*
WrappingRawFilesystem
)
Release
(
header
*
InHeader
,
f
RawFuseFile
)
{
me
.
o
riginal
.
Release
(
header
,
f
)
me
.
O
riginal
.
Release
(
header
,
f
)
}
}
func
(
me
*
WrappingRawFilesystem
)
ReleaseDir
(
header
*
InHeader
,
f
RawFuseDir
)
{
func
(
me
*
WrappingRawFilesystem
)
ReleaseDir
(
header
*
InHeader
,
f
RawFuseDir
)
{
me
.
o
riginal
.
ReleaseDir
(
header
,
f
)
me
.
O
riginal
.
ReleaseDir
(
header
,
f
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment