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
6fd55492
Commit
6fd55492
authored
Mar 29, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move FsyncIn type.
parent
e56b7970
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
21 additions
and
24 deletions
+21
-24
fuse/api.go
fuse/api.go
+3
-3
fuse/defaultfile.go
fuse/defaultfile.go
+1
-1
fuse/defaultraw.go
fuse/defaultraw.go
+2
-2
fuse/files.go
fuse/files.go
+3
-3
fuse/fsetattr_test.go
fuse/fsetattr_test.go
+0
-4
fuse/lockingfs.go
fuse/lockingfs.go
+2
-2
fuse/opcode.go
fuse/opcode.go
+4
-4
fuse/types.go
fuse/types.go
+0
-5
raw/types.go
raw/types.go
+6
-0
No files found.
fuse/api.go
View file @
6fd55492
...
...
@@ -165,7 +165,7 @@ type File interface {
Write
(
*
WriteIn
,
[]
byte
)
(
written
uint32
,
code
Status
)
Flush
()
Status
Release
()
Fsync
(
*
FsyncIn
)
(
code
Status
)
Fsync
(
flags
int
)
(
code
Status
)
// The methods below may be called on closed files, due to
// concurrency. In that case, you should return EBADF.
...
...
@@ -283,13 +283,13 @@ type RawFileSystem interface {
Release
(
header
*
InHeader
,
input
*
raw
.
ReleaseIn
)
Write
(
*
InHeader
,
*
WriteIn
,
[]
byte
)
(
written
uint32
,
code
Status
)
Flush
(
header
*
InHeader
,
input
*
FlushIn
)
Status
Fsync
(
*
InHeader
,
*
FsyncIn
)
(
code
Status
)
Fsync
(
*
InHeader
,
*
raw
.
FsyncIn
)
(
code
Status
)
// Directory handling
OpenDir
(
header
*
InHeader
,
input
*
raw
.
OpenIn
)
(
flags
uint32
,
handle
uint64
,
status
Status
)
ReadDir
(
header
*
InHeader
,
input
*
ReadIn
)
(
*
DirEntryList
,
Status
)
ReleaseDir
(
header
*
InHeader
,
input
*
raw
.
ReleaseIn
)
FsyncDir
(
header
*
InHeader
,
input
*
FsyncIn
)
(
code
Status
)
FsyncDir
(
header
*
InHeader
,
input
*
raw
.
FsyncIn
)
(
code
Status
)
//
Ioctl
(
header
*
InHeader
,
input
*
raw
.
IoctlIn
)
(
output
*
raw
.
IoctlOut
,
data
[]
byte
,
code
Status
)
...
...
fuse/defaultfile.go
View file @
6fd55492
...
...
@@ -39,7 +39,7 @@ func (me *DefaultFile) GetAttr() (*Attr, Status) {
return
nil
,
ENOSYS
}
func
(
me
*
DefaultFile
)
Fsync
(
*
FsyncIn
)
(
code
Status
)
{
func
(
me
*
DefaultFile
)
Fsync
(
flags
int
)
(
code
Status
)
{
return
ENOSYS
}
...
...
fuse/defaultraw.go
View file @
6fd55492
...
...
@@ -117,7 +117,7 @@ func (me *DefaultRawFileSystem) Flush(header *InHeader, input *FlushIn) Status {
return
OK
}
func
(
me
*
DefaultRawFileSystem
)
Fsync
(
header
*
InHeader
,
input
*
FsyncIn
)
(
code
Status
)
{
func
(
me
*
DefaultRawFileSystem
)
Fsync
(
header
*
InHeader
,
input
*
raw
.
FsyncIn
)
(
code
Status
)
{
return
ENOSYS
}
...
...
@@ -128,7 +128,7 @@ func (me *DefaultRawFileSystem) ReadDir(header *InHeader, input *ReadIn) (*DirEn
func
(
me
*
DefaultRawFileSystem
)
ReleaseDir
(
header
*
InHeader
,
input
*
raw
.
ReleaseIn
)
{
}
func
(
me
*
DefaultRawFileSystem
)
FsyncDir
(
header
*
InHeader
,
input
*
FsyncIn
)
(
code
Status
)
{
func
(
me
*
DefaultRawFileSystem
)
FsyncDir
(
header
*
InHeader
,
input
*
raw
.
FsyncIn
)
(
code
Status
)
{
return
ENOSYS
}
...
...
fuse/files.go
View file @
6fd55492
...
...
@@ -72,7 +72,7 @@ func (me *DevNullFile) Flush() Status {
return
OK
}
func
(
me
*
DevNullFile
)
Fsync
(
*
FsyncIn
)
(
code
Status
)
{
func
(
me
*
DevNullFile
)
Fsync
(
flags
int
)
(
code
Status
)
{
return
OK
}
...
...
@@ -112,7 +112,7 @@ func (me *LoopbackFile) Release() {
me
.
File
.
Close
()
}
func
(
me
*
LoopbackFile
)
Fsync
(
*
FsyncIn
)
(
code
Status
)
{
func
(
me
*
LoopbackFile
)
Fsync
(
flags
int
)
(
code
Status
)
{
return
ToStatus
(
syscall
.
Fsync
(
int
(
me
.
File
.
Fd
())))
}
...
...
@@ -156,7 +156,7 @@ func (me *ReadOnlyFile) Write(input *WriteIn, data []byte) (uint32, Status) {
return
0
,
EPERM
}
func
(
me
*
ReadOnlyFile
)
Fsync
(
*
FsyncIn
)
(
code
Status
)
{
func
(
me
*
ReadOnlyFile
)
Fsync
(
flag
int
)
(
code
Status
)
{
return
OK
}
...
...
fuse/fsetattr_test.go
View file @
6fd55492
...
...
@@ -56,10 +56,6 @@ func (me *MutableDataFile) GetAttr() (*Attr, Status) {
return
me
.
getAttr
(),
OK
}
func
(
me
*
MutableDataFile
)
Fsync
(
*
FsyncIn
)
(
code
Status
)
{
return
OK
}
func
(
me
*
MutableDataFile
)
Utimens
(
atimeNs
int64
,
mtimeNs
int64
)
Status
{
me
.
Attr
.
SetNs
(
atimeNs
,
mtimeNs
,
-
1
)
return
OK
...
...
fuse/lockingfs.go
View file @
6fd55492
...
...
@@ -290,7 +290,7 @@ func (me *LockingRawFileSystem) Flush(header *InHeader, input *FlushIn) Status {
return
me
.
RawFileSystem
.
Flush
(
header
,
input
)
}
func
(
me
*
LockingRawFileSystem
)
Fsync
(
header
*
InHeader
,
input
*
FsyncIn
)
(
code
Status
)
{
func
(
me
*
LockingRawFileSystem
)
Fsync
(
header
*
InHeader
,
input
*
raw
.
FsyncIn
)
(
code
Status
)
{
defer
me
.
locked
()()
return
me
.
RawFileSystem
.
Fsync
(
header
,
input
)
}
...
...
@@ -300,7 +300,7 @@ func (me *LockingRawFileSystem) ReadDir(header *InHeader, input *ReadIn) (*DirEn
return
me
.
RawFileSystem
.
ReadDir
(
header
,
input
)
}
func
(
me
*
LockingRawFileSystem
)
FsyncDir
(
header
*
InHeader
,
input
*
FsyncIn
)
(
code
Status
)
{
func
(
me
*
LockingRawFileSystem
)
FsyncDir
(
header
*
InHeader
,
input
*
raw
.
FsyncIn
)
(
code
Status
)
{
defer
me
.
locked
()()
return
me
.
RawFileSystem
.
FsyncDir
(
header
,
input
)
}
fuse/opcode.go
View file @
6fd55492
...
...
@@ -288,7 +288,7 @@ func doRelease(state *MountState, req *request) {
}
func
doFsync
(
state
*
MountState
,
req
*
request
)
{
req
.
status
=
state
.
fileSystem
.
Fsync
(
req
.
inHeader
,
(
*
FsyncIn
)(
req
.
inData
))
req
.
status
=
state
.
fileSystem
.
Fsync
(
req
.
inHeader
,
(
*
raw
.
FsyncIn
)(
req
.
inData
))
}
func
doReleaseDir
(
state
*
MountState
,
req
*
request
)
{
...
...
@@ -296,7 +296,7 @@ func doReleaseDir(state *MountState, req *request) {
}
func
doFsyncDir
(
state
*
MountState
,
req
*
request
)
{
req
.
status
=
state
.
fileSystem
.
FsyncDir
(
req
.
inHeader
,
(
*
FsyncIn
)(
req
.
inData
))
req
.
status
=
state
.
fileSystem
.
FsyncDir
(
req
.
inHeader
,
(
*
raw
.
FsyncIn
)(
req
.
inData
))
}
func
doSetXAttr
(
state
*
MountState
,
req
*
request
)
{
...
...
@@ -400,7 +400,7 @@ func init() {
_OP_READ
:
unsafe
.
Sizeof
(
ReadIn
{}),
_OP_WRITE
:
unsafe
.
Sizeof
(
WriteIn
{}),
_OP_RELEASE
:
unsafe
.
Sizeof
(
raw
.
ReleaseIn
{}),
_OP_FSYNC
:
unsafe
.
Sizeof
(
FsyncIn
{}),
_OP_FSYNC
:
unsafe
.
Sizeof
(
raw
.
FsyncIn
{}),
_OP_SETXATTR
:
unsafe
.
Sizeof
(
raw
.
SetXAttrIn
{}),
_OP_GETXATTR
:
unsafe
.
Sizeof
(
raw
.
GetXAttrIn
{}),
_OP_LISTXATTR
:
unsafe
.
Sizeof
(
raw
.
GetXAttrIn
{}),
...
...
@@ -409,7 +409,7 @@ func init() {
_OP_OPENDIR
:
unsafe
.
Sizeof
(
raw
.
OpenIn
{}),
_OP_READDIR
:
unsafe
.
Sizeof
(
ReadIn
{}),
_OP_RELEASEDIR
:
unsafe
.
Sizeof
(
raw
.
ReleaseIn
{}),
_OP_FSYNCDIR
:
unsafe
.
Sizeof
(
FsyncIn
{}),
_OP_FSYNCDIR
:
unsafe
.
Sizeof
(
raw
.
FsyncIn
{}),
_OP_ACCESS
:
unsafe
.
Sizeof
(
raw
.
AccessIn
{}),
_OP_CREATE
:
unsafe
.
Sizeof
(
CreateIn
{}),
_OP_INTERRUPT
:
unsafe
.
Sizeof
(
raw
.
InterruptIn
{}),
...
...
fuse/types.go
View file @
6fd55492
...
...
@@ -176,11 +176,6 @@ type StatfsOut struct {
Kstatfs
}
type
FsyncIn
struct
{
Fh
uint64
FsyncFlags
uint32
Padding
uint32
}
type
InHeader
struct
{
Length
uint32
...
...
raw/types.go
View file @
6fd55492
...
...
@@ -264,3 +264,9 @@ type AccessIn struct {
Mask
uint32
Padding
uint32
}
type
FsyncIn
struct
{
Fh
uint64
FsyncFlags
uint32
Padding
uint32
}
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