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
6d9ae31b
Commit
6d9ae31b
authored
Mar 12, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse: add opcode and types for copyfilerange and lseek
add MaxPages to InitOut
parent
34f8ad4a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
141 additions
and
108 deletions
+141
-108
fuse/opcode.go
fuse/opcode.go
+117
-107
fuse/types.go
fuse/types.go
+24
-1
No files found.
fuse/opcode.go
View file @
6d9ae31b
...
...
@@ -58,6 +58,8 @@ const (
_OP_FALLOCATE
=
int32
(
43
)
// protocol version 19.
_OP_READDIRPLUS
=
int32
(
44
)
// protocol version 21.
_OP_RENAME2
=
int32
(
45
)
// protocol version 23.
_OP_LSEEK
=
int32
(
46
)
_OP_COPY_FILE_RANGE
=
int32
(
47
)
// The following entries don't have to be compatible across Go-FUSE versions.
_OP_NOTIFY_INVAL_ENTRY
=
int32
(
100
)
...
...
@@ -539,6 +541,8 @@ func init() {
_OP_FALLOCATE
:
unsafe
.
Sizeof
(
FallocateIn
{}),
_OP_READDIRPLUS
:
unsafe
.
Sizeof
(
ReadIn
{}),
_OP_RENAME2
:
unsafe
.
Sizeof
(
RenameIn
{}),
_OP_LSEEK
:
unsafe
.
Sizeof
(
LseekIn
{}),
_OP_COPY_FILE_RANGE
:
unsafe
.
Sizeof
(
CopyFileRangeIn
{}),
}
{
operationHandlers
[
op
]
.
InputSize
=
sz
}
...
...
@@ -568,6 +572,7 @@ func init() {
_OP_NOTIFY_STORE_CACHE
:
unsafe
.
Sizeof
(
NotifyStoreOut
{}),
_OP_NOTIFY_RETRIEVE_CACHE
:
unsafe
.
Sizeof
(
NotifyRetrieveOut
{}),
_OP_NOTIFY_DELETE
:
unsafe
.
Sizeof
(
NotifyInvalDeleteOut
{}),
_OP_LSEEK
:
unsafe
.
Sizeof
(
LseekOut
{}),
}
{
operationHandlers
[
op
]
.
OutputSize
=
sz
}
...
...
@@ -621,6 +626,8 @@ func init() {
_OP_FALLOCATE
:
"FALLOCATE"
,
_OP_READDIRPLUS
:
"READDIRPLUS"
,
_OP_RENAME2
:
"RENAME2"
,
_OP_LSEEK
:
"LSEEK"
,
_OP_COPY_FILE_RANGE
:
"COPY_FILE_RANGE"
,
}
{
operationHandlers
[
op
]
.
Name
=
v
}
...
...
@@ -690,6 +697,7 @@ func init() {
_OP_STATFS
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
StatfsOut
)(
ptr
)
},
_OP_SYMLINK
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
EntryOut
)(
ptr
)
},
_OP_GETLK
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
LkOut
)(
ptr
)
},
_OP_LSEEK
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
LseekOut
)(
ptr
)
},
}
{
operationHandlers
[
op
]
.
DecodeOut
=
f
}
...
...
@@ -725,6 +733,8 @@ func init() {
_OP_SETLKW
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
LkIn
)(
ptr
)
},
_OP_RENAME2
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
RenameIn
)(
ptr
)
},
_OP_INTERRUPT
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
InterruptIn
)(
ptr
)
},
_OP_LSEEK
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
LseekIn
)(
ptr
)
},
_OP_COPY_FILE_RANGE
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
CopyFileRangeIn
)(
ptr
)
},
}
{
operationHandlers
[
op
]
.
DecodeIn
=
f
}
...
...
fuse/types.go
View file @
6d9ae31b
...
...
@@ -305,7 +305,9 @@ type InitOut struct {
CongestionThreshold
uint16
MaxWrite
uint32
TimeGran
uint32
Unused
[
9
]
uint32
MaxPages
uint16
Padding
uint16
Unused
[
8
]
uint32
}
type
_CuseInitIn
struct
{
...
...
@@ -504,6 +506,27 @@ type FlushIn struct {
LockOwner
uint64
}
type
LseekIn
struct
{
Fh
uint64
Offset
uint64
Whence
uint32
Padding
uint32
}
type
LseekOut
struct
{
Offset
uint64
}
type
CopyFileRangeIn
struct
{
FhIn
uint64
OffIn
uint64
NodeIdOut
uint64
FhOut
uint64
OffOut
uint64
Len
uint64
Flags
uint64
}
type
EntryOut
struct
{
NodeId
uint64
Generation
uint64
...
...
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