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
a4c74fec
Commit
a4c74fec
authored
Mar 29, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move FlushIn
parent
c08fcaa9
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
18 additions
and
18 deletions
+18
-18
fuse/api.go
fuse/api.go
+1
-1
fuse/defaultraw.go
fuse/defaultraw.go
+1
-1
fuse/fsops.go
fuse/fsops.go
+1
-1
fuse/lockingfs.go
fuse/lockingfs.go
+1
-1
fuse/opcode.go
fuse/opcode.go
+3
-3
fuse/typeprint.go
fuse/typeprint.go
+0
-4
fuse/types.go
fuse/types.go
+0
-7
raw/print.go
raw/print.go
+4
-0
raw/types.go
raw/types.go
+7
-0
No files found.
fuse/api.go
View file @
a4c74fec
...
...
@@ -282,7 +282,7 @@ type RawFileSystem interface {
Release
(
header
*
InHeader
,
input
*
raw
.
ReleaseIn
)
Write
(
*
InHeader
,
*
WriteIn
,
[]
byte
)
(
written
uint32
,
code
Status
)
Flush
(
header
*
InHeader
,
input
*
FlushIn
)
Status
Flush
(
header
*
InHeader
,
input
*
raw
.
FlushIn
)
Status
Fsync
(
*
InHeader
,
*
raw
.
FsyncIn
)
(
code
Status
)
// Directory handling
...
...
fuse/defaultraw.go
View file @
a4c74fec
...
...
@@ -113,7 +113,7 @@ func (me *DefaultRawFileSystem) Write(header *InHeader, input *WriteIn, data []b
return
0
,
ENOSYS
}
func
(
me
*
DefaultRawFileSystem
)
Flush
(
header
*
InHeader
,
input
*
FlushIn
)
Status
{
func
(
me
*
DefaultRawFileSystem
)
Flush
(
header
*
InHeader
,
input
*
raw
.
FlushIn
)
Status
{
return
OK
}
...
...
fuse/fsops.go
View file @
a4c74fec
...
...
@@ -348,7 +348,7 @@ func (me *FileSystemConnector) StatFs(header *InHeader) *StatfsOut {
return
node
.
FsNode
()
.
StatFs
()
}
func
(
me
*
FileSystemConnector
)
Flush
(
header
*
InHeader
,
input
*
FlushIn
)
Status
{
func
(
me
*
FileSystemConnector
)
Flush
(
header
*
InHeader
,
input
*
raw
.
FlushIn
)
Status
{
node
:=
me
.
toInode
(
header
.
NodeId
)
opened
:=
node
.
mount
.
getOpenedFile
(
input
.
Fh
)
return
opened
.
WithFlags
.
File
.
Flush
()
...
...
fuse/lockingfs.go
View file @
a4c74fec
...
...
@@ -285,7 +285,7 @@ func (me *LockingRawFileSystem) Write(header *InHeader, input *WriteIn, data []b
return
me
.
RawFileSystem
.
Write
(
header
,
input
,
data
)
}
func
(
me
*
LockingRawFileSystem
)
Flush
(
header
*
InHeader
,
input
*
FlushIn
)
Status
{
func
(
me
*
LockingRawFileSystem
)
Flush
(
header
*
InHeader
,
input
*
raw
.
FlushIn
)
Status
{
defer
me
.
locked
()()
return
me
.
RawFileSystem
.
Flush
(
header
,
input
)
}
...
...
fuse/opcode.go
View file @
a4c74fec
...
...
@@ -280,7 +280,7 @@ func doRead(state *MountState, req *request) {
}
func
doFlush
(
state
*
MountState
,
req
*
request
)
{
req
.
status
=
state
.
fileSystem
.
Flush
(
req
.
inHeader
,
(
*
FlushIn
)(
req
.
inData
))
req
.
status
=
state
.
fileSystem
.
Flush
(
req
.
inHeader
,
(
*
raw
.
FlushIn
)(
req
.
inData
))
}
func
doRelease
(
state
*
MountState
,
req
*
request
)
{
...
...
@@ -404,7 +404,7 @@ func init() {
_OP_SETXATTR
:
unsafe
.
Sizeof
(
raw
.
SetXAttrIn
{}),
_OP_GETXATTR
:
unsafe
.
Sizeof
(
raw
.
GetXAttrIn
{}),
_OP_LISTXATTR
:
unsafe
.
Sizeof
(
raw
.
GetXAttrIn
{}),
_OP_FLUSH
:
unsafe
.
Sizeof
(
FlushIn
{}),
_OP_FLUSH
:
unsafe
.
Sizeof
(
raw
.
FlushIn
{}),
_OP_INIT
:
unsafe
.
Sizeof
(
raw
.
InitIn
{}),
_OP_OPENDIR
:
unsafe
.
Sizeof
(
raw
.
OpenIn
{}),
_OP_READDIR
:
unsafe
.
Sizeof
(
ReadIn
{}),
...
...
@@ -548,7 +548,7 @@ func init() {
// Inputs.
for
op
,
f
:=
range
map
[
opcode
]
castPointerFunc
{
_OP_FLUSH
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
FlushIn
)(
ptr
)
},
_OP_FLUSH
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
FlushIn
)(
ptr
)
},
_OP_GETATTR
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
GetAttrIn
)(
ptr
)
},
_OP_SETATTR
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
SetAttrIn
)(
ptr
)
},
_OP_INIT
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
InitIn
)(
ptr
)
},
...
...
fuse/typeprint.go
View file @
a4c74fec
...
...
@@ -59,10 +59,6 @@ func (me *ReadIn) String() string {
}
func
(
me
*
FlushIn
)
String
()
string
{
return
fmt
.
Sprintf
(
"{Fh %d}"
,
me
.
Fh
)
}
func
(
me
*
Kstatfs
)
String
()
string
{
return
fmt
.
Sprintf
(
"{b%d f%d fs%d ff%d bs%d nl%d frs%d}"
,
...
...
fuse/types.go
View file @
a4c74fec
...
...
@@ -121,13 +121,6 @@ type CreateOut struct {
raw
.
OpenOut
}
type
FlushIn
struct
{
Fh
uint64
Unused
uint32
Padding
uint32
LockOwner
uint64
}
const
(
READ_LOCKOWNER
=
(
1
<<
1
)
)
...
...
raw/print.go
View file @
a4c74fec
...
...
@@ -176,3 +176,7 @@ func (me *CreateIn) String() string {
FlagString
(
OpenFlagNames
,
int
(
me
.
Flags
),
"O_RDONLY"
),
me
.
Umask
)
}
func
(
me
*
FlushIn
)
String
()
string
{
return
fmt
.
Sprintf
(
"{Fh %d}"
,
me
.
Fh
)
}
raw/types.go
View file @
a4c74fec
...
...
@@ -303,3 +303,10 @@ const (
NOTIFY_INVAL_ENTRY
=
-
3
NOTIFY_CODE_MAX
=
-
4
)
type
FlushIn
struct
{
Fh
uint64
Unused
uint32
Padding
uint32
LockOwner
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