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
9c331316
Commit
9c331316
authored
Mar 25, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse: add cancel channel to Release call
This is unlikely to be useful, but makes the API more uniform.
parent
cbed0736
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
7 deletions
+6
-7
fuse/api.go
fuse/api.go
+1
-1
fuse/defaultraw.go
fuse/defaultraw.go
+1
-1
fuse/nodefs/fsops.go
fuse/nodefs/fsops.go
+1
-1
fuse/opcode.go
fuse/opcode.go
+1
-1
nodefs/bridge.go
nodefs/bridge.go
+2
-3
No files found.
fuse/api.go
View file @
9c331316
...
...
@@ -246,7 +246,7 @@ type RawFileSystem interface {
SetLk
(
cancel
<-
chan
struct
{},
input
*
LkIn
)
(
code
Status
)
SetLkw
(
cancel
<-
chan
struct
{},
input
*
LkIn
)
(
code
Status
)
Release
(
input
*
ReleaseIn
)
Release
(
cancel
<-
chan
struct
{},
input
*
ReleaseIn
)
Write
(
cancel
<-
chan
struct
{},
input
*
WriteIn
,
data
[]
byte
)
(
written
uint32
,
code
Status
)
CopyFileRange
(
cancel
<-
chan
struct
{},
input
*
CopyFileRangeIn
)
(
written
uint32
,
code
Status
)
...
...
fuse/defaultraw.go
View file @
9c331316
...
...
@@ -125,7 +125,7 @@ func (fs *defaultRawFileSystem) SetLkw(cancel <-chan struct{}, in *LkIn) (code S
return
ENOSYS
}
func
(
fs
*
defaultRawFileSystem
)
Release
(
input
*
ReleaseIn
)
{
func
(
fs
*
defaultRawFileSystem
)
Release
(
cancel
<-
chan
struct
{},
input
*
ReleaseIn
)
{
}
func
(
fs
*
defaultRawFileSystem
)
Write
(
cancel
<-
chan
struct
{},
input
*
WriteIn
,
data
[]
byte
)
(
written
uint32
,
code
Status
)
{
...
...
fuse/nodefs/fsops.go
View file @
9c331316
...
...
@@ -362,7 +362,7 @@ func (c *rawBridge) Create(cancel <-chan struct{}, input *fuse.CreateIn, name st
return
code
}
func
(
c
*
rawBridge
)
Release
(
input
*
fuse
.
ReleaseIn
)
{
func
(
c
*
rawBridge
)
Release
(
cancel
<-
chan
struct
{},
input
*
fuse
.
ReleaseIn
)
{
if
input
.
Fh
!=
0
{
node
:=
c
.
toInode
(
input
.
NodeId
)
opened
:=
node
.
mount
.
unregisterFileHandle
(
input
.
Fh
,
node
)
...
...
fuse/opcode.go
View file @
9c331316
...
...
@@ -360,7 +360,7 @@ func doFlush(server *Server, req *request) {
}
func
doRelease
(
server
*
Server
,
req
*
request
)
{
server
.
fileSystem
.
Release
((
*
ReleaseIn
)(
req
.
inData
))
server
.
fileSystem
.
Release
(
req
.
cancel
,
(
*
ReleaseIn
)(
req
.
inData
))
}
func
doFsync
(
server
*
Server
,
req
*
request
)
{
...
...
nodefs/bridge.go
View file @
9c331316
...
...
@@ -550,15 +550,14 @@ func (b *rawBridge) SetLkw(cancel <-chan struct{}, input *fuse.LkIn) fuse.Status
return
fuse
.
ENOTSUP
}
func
(
b
*
rawBridge
)
Release
(
input
*
fuse
.
ReleaseIn
)
{
// XXX should have cancel channel too.
func
(
b
*
rawBridge
)
Release
(
cancel
<-
chan
struct
{},
input
*
fuse
.
ReleaseIn
)
{
n
,
f
:=
b
.
releaseFileEntry
(
input
.
NodeId
,
input
.
Fh
)
if
f
==
nil
{
return
}
f
.
wg
.
Wait
()
n
.
fileOps
()
.
Release
(
&
fuse
.
Context
{
Caller
:
input
.
Caller
,
Cancel
:
ni
l
},
f
.
file
)
n
.
fileOps
()
.
Release
(
&
fuse
.
Context
{
Caller
:
input
.
Caller
,
Cancel
:
cance
l
},
f
.
file
)
b
.
mu
.
Lock
()
defer
b
.
mu
.
Unlock
()
...
...
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