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
c29cdc95
Commit
c29cdc95
authored
Jul 15, 2014
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse: clarify the calling convention for entry/delete notify.
parent
0937d8d2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
fuse/nodefs/fsconnector.go
fuse/nodefs/fsconnector.go
+4
-2
fuse/server.go
fuse/server.go
+4
-2
No files found.
fuse/nodefs/fsconnector.go
View file @
c29cdc95
...
@@ -392,7 +392,8 @@ func (c *FileSystemConnector) FileNotify(node *Inode, off int64, length int64) f
...
@@ -392,7 +392,8 @@ func (c *FileSystemConnector) FileNotify(node *Inode, off int64, length int64) f
// EntryNotify makes the kernel forget the entry data from the given
// EntryNotify makes the kernel forget the entry data from the given
// name from a directory. After this call, the kernel will issue a
// name from a directory. After this call, the kernel will issue a
// new lookup request for the given name when necessary.
// new lookup request for the given name when necessary. No filesystem
// related locks should be held when calling this.
func
(
c
*
FileSystemConnector
)
EntryNotify
(
node
*
Inode
,
name
string
)
fuse
.
Status
{
func
(
c
*
FileSystemConnector
)
EntryNotify
(
node
*
Inode
,
name
string
)
fuse
.
Status
{
var
nId
uint64
var
nId
uint64
if
node
==
c
.
rootNode
{
if
node
==
c
.
rootNode
{
...
@@ -408,7 +409,8 @@ func (c *FileSystemConnector) EntryNotify(node *Inode, name string) fuse.Status
...
@@ -408,7 +409,8 @@ func (c *FileSystemConnector) EntryNotify(node *Inode, name string) fuse.Status
}
}
// DeleteNotify signals to the kernel that the named entry in dir for
// DeleteNotify signals to the kernel that the named entry in dir for
// the child disappeared.
// the child disappeared. No filesystem related locks should be held
// when calling this.
func
(
c
*
FileSystemConnector
)
DeleteNotify
(
dir
*
Inode
,
child
*
Inode
,
name
string
)
fuse
.
Status
{
func
(
c
*
FileSystemConnector
)
DeleteNotify
(
dir
*
Inode
,
child
*
Inode
,
name
string
)
fuse
.
Status
{
var
nId
uint64
var
nId
uint64
...
...
fuse/server.go
View file @
c29cdc95
...
@@ -401,7 +401,8 @@ func (ms *Server) InodeNotify(node uint64, off int64, length int64) Status {
...
@@ -401,7 +401,8 @@ func (ms *Server) InodeNotify(node uint64, off int64, length int64) Status {
// DeleteNotify notifies the kernel that an entry is removed from a
// DeleteNotify notifies the kernel that an entry is removed from a
// directory. In many cases, this is equivalent to EntryNotify,
// directory. In many cases, this is equivalent to EntryNotify,
// except when the directory is in use, eg. as working directory of
// except when the directory is in use, eg. as working directory of
// some process.
// some process. You should not hold any FUSE filesystem locks, as that
// can lead to deadlock.
func
(
ms
*
Server
)
DeleteNotify
(
parent
uint64
,
child
uint64
,
name
string
)
Status
{
func
(
ms
*
Server
)
DeleteNotify
(
parent
uint64
,
child
uint64
,
name
string
)
Status
{
if
ms
.
kernelSettings
.
Minor
<
18
{
if
ms
.
kernelSettings
.
Minor
<
18
{
return
ms
.
EntryNotify
(
parent
,
name
)
return
ms
.
EntryNotify
(
parent
,
name
)
...
@@ -440,7 +441,8 @@ func (ms *Server) DeleteNotify(parent uint64, child uint64, name string) Status
...
@@ -440,7 +441,8 @@ func (ms *Server) DeleteNotify(parent uint64, child uint64, name string) Status
}
}
// EntryNotify should be used if the existence status of an entry
// EntryNotify should be used if the existence status of an entry
// within a directory changes.
// within a directory changes. You should not hold any FUSE filesystem
// locks, as that can lead to deadlock.
func
(
ms
*
Server
)
EntryNotify
(
parent
uint64
,
name
string
)
Status
{
func
(
ms
*
Server
)
EntryNotify
(
parent
uint64
,
name
string
)
Status
{
req
:=
request
{
req
:=
request
{
inHeader
:
&
InHeader
{
inHeader
:
&
InHeader
{
...
...
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