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
9ecf4dc5
Commit
9ecf4dc5
authored
Feb 09, 2016
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse: add type glue for v22 and v23 protocol extensions.
parent
a868fcda
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
34 deletions
+60
-34
fuse/opcode.go
fuse/opcode.go
+9
-0
fuse/print.go
fuse/print.go
+21
-17
fuse/types.go
fuse/types.go
+30
-17
No files found.
fuse/opcode.go
View file @
9ecf4dc5
...
@@ -51,6 +51,7 @@ const (
...
@@ -51,6 +51,7 @@ const (
_OP_BATCH_FORGET
=
int32
(
42
)
_OP_BATCH_FORGET
=
int32
(
42
)
_OP_FALLOCATE
=
int32
(
43
)
// protocol version 19.
_OP_FALLOCATE
=
int32
(
43
)
// protocol version 19.
_OP_READDIRPLUS
=
int32
(
44
)
// protocol version 21.
_OP_READDIRPLUS
=
int32
(
44
)
// protocol version 21.
_OP_FUSE_RENAME2
=
int32
(
45
)
// protocol version 23.
// The following entries don't have to be compatible across Go-FUSE versions.
// The following entries don't have to be compatible across Go-FUSE versions.
_OP_NOTIFY_ENTRY
=
int32
(
100
)
_OP_NOTIFY_ENTRY
=
int32
(
100
)
...
@@ -98,6 +99,14 @@ func doInit(server *Server, req *request) {
...
@@ -98,6 +99,14 @@ func doInit(server *Server, req *request) {
out
.
Minor
=
input
.
Minor
out
.
Minor
=
input
.
Minor
}
}
if
out
.
Minor
<=
22
{
tweaked
:=
*
req
.
handler
// v8-v22 don't have TimeGran and further fields.
tweaked
.
OutputSize
=
24
req
.
handler
=
&
tweaked
}
req
.
outData
=
unsafe
.
Pointer
(
out
)
req
.
outData
=
unsafe
.
Pointer
(
out
)
req
.
status
=
OK
req
.
status
=
OK
}
}
...
...
fuse/print.go
View file @
9ecf4dc5
...
@@ -39,6 +39,9 @@ func init() {
...
@@ -39,6 +39,9 @@ func init() {
CAP_AUTO_INVAL_DATA
:
"AUTO_INVAL_DATA"
,
CAP_AUTO_INVAL_DATA
:
"AUTO_INVAL_DATA"
,
CAP_READDIRPLUS
:
"READDIRPLUS"
,
CAP_READDIRPLUS
:
"READDIRPLUS"
,
CAP_READDIRPLUS_AUTO
:
"READDIRPLUS_AUTO"
,
CAP_READDIRPLUS_AUTO
:
"READDIRPLUS_AUTO"
,
CAP_FUSE_ASYNC_DIO
:
"ASYNC_DIO"
,
CAP_FUSE_WRITEBACK_CACHE
:
"WRITEBACK_CACHE"
,
CAP_FUSE_NO_OPEN_SUPPORT
:
"NO_OPEN_SUPPORT"
,
}
}
releaseFlagNames
=
map
[
int64
]
string
{
releaseFlagNames
=
map
[
int64
]
string
{
RELEASE_FLUSH
:
"FLUSH"
,
RELEASE_FLUSH
:
"FLUSH"
,
...
@@ -155,10 +158,11 @@ func (me *InitIn) string() string {
...
@@ -155,10 +158,11 @@ func (me *InitIn) string() string {
}
}
func
(
me
*
InitOut
)
string
()
string
{
func
(
me
*
InitOut
)
string
()
string
{
return
fmt
.
Sprintf
(
"{%d.%d Ra 0x%x %s %d/%d Wr 0x%x}"
,
return
fmt
.
Sprintf
(
"{%d.%d Ra 0x%x %s %d/%d Wr 0x%x
Tg 0x%x
}"
,
me
.
Major
,
me
.
Minor
,
me
.
MaxReadAhead
,
me
.
Major
,
me
.
Minor
,
me
.
MaxReadAhead
,
FlagString
(
initFlagNames
,
int64
(
me
.
Flags
),
""
),
FlagString
(
initFlagNames
,
int64
(
me
.
Flags
),
""
),
me
.
CongestionThreshold
,
me
.
MaxBackground
,
me
.
MaxWrite
)
me
.
CongestionThreshold
,
me
.
MaxBackground
,
me
.
MaxWrite
,
me
.
TimeGran
)
}
}
func
(
s
*
FsyncIn
)
string
()
string
{
func
(
s
*
FsyncIn
)
string
()
string
{
...
...
fuse/types.go
View file @
9ecf4dc5
...
@@ -61,6 +61,13 @@ type RenameIn struct {
...
@@ -61,6 +61,13 @@ type RenameIn struct {
Newdir
uint64
Newdir
uint64
}
}
type
Rename2In
struct
{
InHeader
Newdir
uint64
Flags
uint32
Padding
uint32
}
type
LinkIn
struct
{
type
LinkIn
struct
{
InHeader
InHeader
Oldnodeid
uint64
Oldnodeid
uint64
...
@@ -82,6 +89,7 @@ const ( // SetAttrIn.Valid
...
@@ -82,6 +89,7 @@ const ( // SetAttrIn.Valid
FATTR_ATIME_NOW
=
(
1
<<
7
)
FATTR_ATIME_NOW
=
(
1
<<
7
)
FATTR_MTIME_NOW
=
(
1
<<
8
)
FATTR_MTIME_NOW
=
(
1
<<
8
)
FATTR_LOCKOWNER
=
(
1
<<
9
)
FATTR_LOCKOWNER
=
(
1
<<
9
)
FATTR_CTIME
=
(
1
<<
10
)
)
)
type
SetAttrInCommon
struct
{
type
SetAttrInCommon
struct
{
...
@@ -94,10 +102,10 @@ type SetAttrInCommon struct {
...
@@ -94,10 +102,10 @@ type SetAttrInCommon struct {
LockOwner
uint64
LockOwner
uint64
Atime
uint64
Atime
uint64
Mtime
uint64
Mtime
uint64
Unused2
uint64
Ctime
uint64
Atimensec
uint32
Atimensec
uint32
Mtimensec
uint32
Mtimensec
uint32
Unused3
uint32
Ctimensec
uint32
Mode
uint32
Mode
uint32
Unused4
uint32
Unused4
uint32
Owner
Owner
...
@@ -150,6 +158,9 @@ const (
...
@@ -150,6 +158,9 @@ const (
CAP_AUTO_INVAL_DATA
=
(
1
<<
12
)
CAP_AUTO_INVAL_DATA
=
(
1
<<
12
)
CAP_READDIRPLUS
=
(
1
<<
13
)
CAP_READDIRPLUS
=
(
1
<<
13
)
CAP_READDIRPLUS_AUTO
=
(
1
<<
14
)
CAP_READDIRPLUS_AUTO
=
(
1
<<
14
)
CAP_FUSE_ASYNC_DIO
=
(
1
<<
15
)
CAP_FUSE_WRITEBACK_CACHE
=
(
1
<<
16
)
CAP_FUSE_NO_OPEN_SUPPORT
=
(
1
<<
17
)
)
)
type
InitIn
struct
{
type
InitIn
struct
{
...
@@ -169,6 +180,8 @@ type InitOut struct {
...
@@ -169,6 +180,8 @@ type InitOut struct {
MaxBackground
uint16
MaxBackground
uint16
CongestionThreshold
uint16
CongestionThreshold
uint16
MaxWrite
uint32
MaxWrite
uint32
TimeGran
uint32
Unused
[
9
]
uint32
}
}
type
_CuseInitIn
struct
{
type
_CuseInitIn
struct
{
...
...
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