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
Kirill Smelkov
go-fuse
Commits
e43f33dc
Commit
e43f33dc
authored
Sep 17, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add pointer from fileSystemMount to FileSystemConnector, and use for Debug.
parent
ad6f59c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
fuse/fsconnector.go
fuse/fsconnector.go
+2
-0
fuse/fsmount.go
fuse/fsmount.go
+4
-2
No files found.
fuse/fsconnector.go
View file @
e43f33dc
...
...
@@ -250,6 +250,7 @@ func (me *FileSystemConnector) findInode(fullPath string) *Inode {
func
(
me
*
FileSystemConnector
)
MountRoot
(
nodeFs
NodeFileSystem
,
opts
*
FileSystemOptions
)
{
me
.
rootNode
.
mountFs
(
nodeFs
,
opts
)
me
.
rootNode
.
mount
.
connector
=
me
nodeFs
.
OnMount
(
me
)
me
.
verify
()
}
...
...
@@ -284,6 +285,7 @@ func (me *FileSystemConnector) Mount(parent *Inode, name string, nodeFs NodeFile
}
node
.
mountFs
(
nodeFs
,
opts
)
node
.
mount
.
connector
=
me
parent
.
addChild
(
name
,
node
)
if
parent
.
mounts
==
nil
{
...
...
fuse/fsmount.go
View file @
e43f33dc
...
...
@@ -39,6 +39,8 @@ type fileSystemMount struct {
openFiles
HandleMap
Debug
bool
connector
*
FileSystemConnector
}
// Must called with lock for parent held.
...
...
@@ -81,8 +83,8 @@ func (me *fileSystemMount) fileInfoToAttr(fi *os.FileInfo, nodeId uint64) (out *
func
(
me
*
fileSystemMount
)
getOpenedFile
(
h
uint64
)
*
openedFile
{
b
:=
(
*
openedFile
)(
unsafe
.
Pointer
(
me
.
openFiles
.
Decode
(
h
)))
if
me
.
Debug
{
log
.
Printf
(
"File %d = %
s
"
,
h
,
b
.
WithFlags
.
Description
)
if
me
.
connector
.
Debug
&&
b
.
WithFlags
.
Description
!=
""
{
log
.
Printf
(
"File %d = %
q
"
,
h
,
b
.
WithFlags
.
Description
)
}
return
b
}
...
...
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