From 39c6e2e5ce11608f7e56b6a9e4113a572bb57ab2 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Tue, 24 Mar 2015 14:12:10 +1100 Subject: [PATCH] Ported LookUpInode. --- fuseops/ops.go | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/fuseops/ops.go b/fuseops/ops.go index 1285f36..cbe6763 100644 --- a/fuseops/ops.go +++ b/fuseops/ops.go @@ -37,6 +37,24 @@ type InitOp struct { // 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 { + Header RequestHeader + + // 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. + Entry ChildInodeEntry } // Refresh the attributes for an inode whose ID was previously returned by @@ -270,28 +288,6 @@ type ReleaseFileHandleOp struct { // Requests and responses //////////////////////////////////////////////////////////////////////// -type LookUpInodeRequest struct { - Header RequestHeader - - // 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 -} - -type LookUpInodeResponse struct { - Entry ChildInodeEntry -} - type GetInodeAttributesRequest struct { Header RequestHeader