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
2b37e448
Commit
2b37e448
authored
Mar 29, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move notify types.
parent
681d28a2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
21 deletions
+24
-21
fuse/api.go
fuse/api.go
+1
-1
fuse/fsconnector.go
fuse/fsconnector.go
+3
-1
fuse/mountstate.go
fuse/mountstate.go
+3
-3
fuse/opcode.go
fuse/opcode.go
+4
-4
fuse/types.go
fuse/types.go
+0
-12
raw/types.go
raw/types.go
+13
-0
No files found.
fuse/api.go
View file @
2b37e448
...
...
@@ -314,6 +314,6 @@ type DefaultRawFileSystem struct{}
// will give the correct result for Lstat (ENOENT), but the kernel
// will still issue file Open() on the inode.
type
RawFsInit
struct
{
InodeNotify
func
(
*
NotifyInvalInodeOut
)
Status
InodeNotify
func
(
*
raw
.
NotifyInvalInodeOut
)
Status
EntryNotify
func
(
parent
uint64
,
name
string
)
Status
}
fuse/fsconnector.go
View file @
2b37e448
...
...
@@ -10,6 +10,8 @@ import (
"strings"
"time"
"unsafe"
"github.com/hanwen/go-fuse/raw"
)
// Tests should set to true.
...
...
@@ -336,7 +338,7 @@ func (me *FileSystemConnector) FileNotify(node *Inode, off int64, length int64)
if
n
==
0
{
return
OK
}
out
:=
NotifyInvalInodeOut
{
out
:=
raw
.
NotifyInvalInodeOut
{
Length
:
length
,
Off
:
off
,
Ino
:
n
,
...
...
fuse/mountstate.go
View file @
2b37e448
...
...
@@ -75,7 +75,7 @@ func (me *MountState) Mount(mountPoint string, opts *MountOptions) error {
return
err
}
initParams
:=
RawFsInit
{
InodeNotify
:
func
(
n
*
NotifyInvalInodeOut
)
Status
{
InodeNotify
:
func
(
n
*
raw
.
NotifyInvalInodeOut
)
Status
{
return
me
.
writeInodeNotify
(
n
)
},
EntryNotify
:
func
(
parent
uint64
,
n
string
)
Status
{
...
...
@@ -279,7 +279,7 @@ func (me *MountState) write(req *request) Status {
return
ToStatus
(
err
)
}
func
(
me
*
MountState
)
writeInodeNotify
(
entry
*
NotifyInvalInodeOut
)
Status
{
func
(
me
*
MountState
)
writeInodeNotify
(
entry
*
raw
.
NotifyInvalInodeOut
)
Status
{
req
:=
request
{
inHeader
:
&
InHeader
{
opcode
:
_OP_NOTIFY_INODE
,
...
...
@@ -305,7 +305,7 @@ func (me *MountState) writeEntryNotify(parent uint64, name string) Status {
handler
:
operationHandlers
[
_OP_NOTIFY_ENTRY
],
status
:
NOTIFY_INVAL_ENTRY
,
}
entry
:=
&
NotifyInvalEntryOut
{
entry
:=
&
raw
.
NotifyInvalEntryOut
{
Parent
:
parent
,
NameLen
:
uint32
(
len
(
name
)),
}
...
...
fuse/opcode.go
View file @
2b37e448
...
...
@@ -439,8 +439,8 @@ func init() {
_OP_BMAP
:
unsafe
.
Sizeof
(
raw
.
BmapOut
{}),
_OP_IOCTL
:
unsafe
.
Sizeof
(
raw
.
IoctlOut
{}),
_OP_POLL
:
unsafe
.
Sizeof
(
raw
.
PollOut
{}),
_OP_NOTIFY_ENTRY
:
unsafe
.
Sizeof
(
NotifyInvalEntryOut
{}),
_OP_NOTIFY_INODE
:
unsafe
.
Sizeof
(
NotifyInvalInodeOut
{}),
_OP_NOTIFY_ENTRY
:
unsafe
.
Sizeof
(
raw
.
NotifyInvalEntryOut
{}),
_OP_NOTIFY_INODE
:
unsafe
.
Sizeof
(
raw
.
NotifyInvalInodeOut
{}),
}
{
operationHandlers
[
op
]
.
OutputSize
=
sz
}
...
...
@@ -539,8 +539,8 @@ func init() {
_OP_SETATTR
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
AttrOut
)(
ptr
)
},
_OP_INIT
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
InitOut
)(
ptr
)
},
_OP_MKDIR
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
EntryOut
)(
ptr
)
},
_OP_NOTIFY_ENTRY
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
NotifyInvalEntryOut
)(
ptr
)
},
_OP_NOTIFY_INODE
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
NotifyInvalInodeOut
)(
ptr
)
},
_OP_NOTIFY_ENTRY
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
NotifyInvalEntryOut
)(
ptr
)
},
_OP_NOTIFY_INODE
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
NotifyInvalInodeOut
)(
ptr
)
},
_OP_STATFS
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
StatfsOut
)(
ptr
)
},
}
{
operationHandlers
[
op
]
.
DecodeOut
=
f
...
...
fuse/types.go
View file @
2b37e448
...
...
@@ -184,15 +184,3 @@ type Dirent struct {
NameLen
uint32
Typ
uint32
}
type
NotifyInvalInodeOut
struct
{
Ino
uint64
Off
int64
Length
int64
}
type
NotifyInvalEntryOut
struct
{
Parent
uint64
NameLen
uint32
Padding
uint32
}
raw/types.go
View file @
2b37e448
...
...
@@ -283,3 +283,16 @@ type CreateIn struct {
Umask
uint32
Padding
uint32
}
type
NotifyInvalInodeOut
struct
{
Ino
uint64
Off
int64
Length
int64
}
type
NotifyInvalEntryOut
struct
{
Parent
uint64
NameLen
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