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
85a08fb9
Commit
85a08fb9
authored
Mar 23, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse: implement Lseek
parent
bffc1113
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
0 deletions
+16
-0
fuse/api.go
fuse/api.go
+1
-0
fuse/defaultraw.go
fuse/defaultraw.go
+4
-0
fuse/nodefs/fsops.go
fuse/nodefs/fsops.go
+4
-0
fuse/opcode.go
fuse/opcode.go
+7
-0
No files found.
fuse/api.go
View file @
85a08fb9
...
...
@@ -239,6 +239,7 @@ type RawFileSystem interface {
Create
(
cancel
<-
chan
struct
{},
input
*
CreateIn
,
name
string
,
out
*
CreateOut
)
(
code
Status
)
Open
(
cancel
<-
chan
struct
{},
input
*
OpenIn
,
out
*
OpenOut
)
(
status
Status
)
Read
(
cancel
<-
chan
struct
{},
input
*
ReadIn
,
buf
[]
byte
)
(
ReadResult
,
Status
)
Lseek
(
cancel
<-
chan
struct
{},
in
*
LseekIn
,
out
*
LseekOut
)
Status
// File locking
GetLk
(
cancel
<-
chan
struct
{},
input
*
LkIn
,
out
*
LkOut
)
(
code
Status
)
...
...
fuse/defaultraw.go
View file @
85a08fb9
...
...
@@ -162,3 +162,7 @@ func (fs *defaultRawFileSystem) Fallocate(cancel <-chan struct{}, in *FallocateI
func
(
fs
*
defaultRawFileSystem
)
CopyFileRange
(
cancel
<-
chan
struct
{},
input
*
CopyFileRangeIn
)
(
written
uint32
,
code
Status
)
{
return
0
,
ENOSYS
}
func
(
fs
*
defaultRawFileSystem
)
Lseek
(
cancel
<-
chan
struct
{},
in
*
LseekIn
,
out
*
LseekOut
)
Status
{
return
ENOSYS
}
fuse/nodefs/fsops.go
View file @
85a08fb9
...
...
@@ -498,3 +498,7 @@ func (c *rawBridge) Flush(cancel <-chan struct{}, input *fuse.FlushIn) fuse.Stat
func
(
c
*
rawBridge
)
CopyFileRange
(
cancel
<-
chan
struct
{},
input
*
fuse
.
CopyFileRangeIn
)
(
written
uint32
,
code
fuse
.
Status
)
{
return
0
,
fuse
.
ENOSYS
}
func
(
fs
*
rawBridge
)
Lseek
(
cancel
<-
chan
struct
{},
in
*
fuse
.
LseekIn
,
out
*
fuse
.
LseekOut
)
fuse
.
Status
{
return
fuse
.
ENOSYS
}
fuse/opcode.go
View file @
85a08fb9
...
...
@@ -441,6 +441,12 @@ func doSetLkw(server *Server, req *request) {
req
.
status
=
server
.
fileSystem
.
SetLkw
(
req
.
cancel
,
(
*
LkIn
)(
req
.
inData
))
}
func
doLseek
(
server
*
Server
,
req
*
request
)
{
in
:=
(
*
LseekIn
)(
req
.
inData
)
out
:=
(
*
LseekOut
)(
req
.
outData
())
req
.
status
=
server
.
fileSystem
.
Lseek
(
req
.
cancel
,
in
,
out
)
}
func
doCopyFileRange
(
server
*
Server
,
req
*
request
)
{
in
:=
(
*
CopyFileRangeIn
)(
req
.
inData
)
out
:=
(
*
WriteOut
)(
req
.
outData
())
...
...
@@ -683,6 +689,7 @@ func init() {
_OP_RENAME2
:
doRename2
,
_OP_INTERRUPT
:
doInterrupt
,
_OP_COPY_FILE_RANGE
:
doCopyFileRange
,
_OP_LSEEK
:
doLseek
,
}
{
operationHandlers
[
op
]
.
Func
=
v
}
...
...
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