Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-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
jacobsa-fuse
Commits
bf3dd28e
Commit
bf3dd28e
authored
Jul 27, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lookUpInodeOp
parent
f0bdfc20
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
33 deletions
+11
-33
ops.go
ops.go
+11
-33
No files found.
ops.go
View file @
bf3dd28e
...
...
@@ -20,51 +20,29 @@ import (
"time"
"unsafe"
"github.com/jacobsa/fuse/fuseops"
"github.com/jacobsa/fuse/internal/buffer"
"github.com/jacobsa/fuse/internal/fusekernel"
)
type
internalOp
struct
{
}
////////////////////////////////////////////////////////////////////////
// Inodes
////////////////////////////////////////////////////////////////////////
// Look up a child by name within a parent directory. The kernel sends this
// when resolving user paths to dentry structs, which are then cached.
type
LookUpInodeOp
struct
{
commonOp
protocol
fusekernel
.
Protocol
// The ID of the directory inode to which the child belongs.
Parent
InodeID
// The name of the child of interest, relative to the parent. For example, in
// this directory structure:
//
// foo/
// bar/
// baz
//
// the file system may receive a request to look up the child named "bar" for
// the parent foo/.
Name
string
// The resulting entry. Must be filled out by the file system.
//
// The lookup count for the inode is implicitly incremented. See notes on
// ForgetInodeOp for more information.
Entry
ChildInodeEntry
}
func
(
o
*
LookUpInodeOp
)
ShortDesc
()
(
desc
string
)
{
desc
=
fmt
.
Sprintf
(
"LookUpInode(parent=%v, name=%q)"
,
o
.
Parent
,
o
.
Name
)
return
type
lookUpInodeOp
struct
{
internalOp
wrapped
fuseops
.
LookUpInodeOp
}
func
(
o
*
LookUpInodeOp
)
kernelResponse
()
(
b
buffer
.
OutMessage
)
{
size
:=
fusekernel
.
EntryOutSize
(
o
.
protocol
)
func
(
o
*
lookUpInodeOp
)
kernelResponse
(
protocol
fusekernel
.
Protocol
)
(
b
buffer
.
OutMessage
)
{
size
:=
fusekernel
.
EntryOutSize
(
protocol
)
b
=
buffer
.
NewOutMessage
(
size
)
out
:=
(
*
fusekernel
.
EntryOut
)(
b
.
Grow
(
size
))
convertChildInodeEntry
(
&
o
.
Entry
,
out
)
convertChildInodeEntry
(
&
o
.
wrapped
.
Entry
,
out
)
return
}
...
...
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