Added bfReq members.

geesefs-0-30-9
Aaron Jacobs 2015-07-22 22:23:11 +10:00
parent aff2fc2f9e
commit 2366f698e2
1 changed files with 20 additions and 0 deletions

View File

@ -61,6 +61,7 @@ type Op interface {
// when resolving user paths to dentry structs, which are then cached.
type LookUpInodeOp struct {
commonOp
bfReq *bazilfuse.LookupRequest
// The ID of the directory inode to which the child belongs.
Parent InodeID
@ -103,6 +104,7 @@ func (o *LookUpInodeOp) toBazilfuseResponse() (bfResp interface{}) {
// field of ChildInodeEntry, etc.
type GetInodeAttributesOp struct {
commonOp
bfReq *bazilfuse.GetattrRequest
// The inode of interest.
Inode InodeID
@ -129,6 +131,7 @@ func (o *GetInodeAttributesOp) toBazilfuseResponse() (bfResp interface{}) {
// cases like ftrunctate(2).
type SetInodeAttributesOp struct {
commonOp
bfReq *bazilfuse.SetattrRequest
// The inode of interest.
Inode InodeID
@ -196,6 +199,7 @@ func (o *SetInodeAttributesOp) toBazilfuseResponse() (bfResp interface{}) {
// implicitly decrementing all lookup counts to zero.
type ForgetInodeOp struct {
commonOp
bfReq *bazilfuse.ForgetRequest
// The inode whose reference count should be decremented.
Inode InodeID
@ -225,6 +229,7 @@ func (o *ForgetInodeOp) toBazilfuseResponse() (bfResp interface{}) {
// Therefore the file system should return EEXIST if the name already exists.
type MkDirOp struct {
commonOp
bfReq *bazilfuse.MkdirRequest
// The ID of parent directory inode within which to create the child.
Parent InodeID
@ -266,6 +271,7 @@ func (o *MkDirOp) toBazilfuseResponse() (bfResp interface{}) {
// Therefore the file system should return EEXIST if the name already exists.
type CreateFileOp struct {
commonOp
bfReq *bazilfuse.CreateRequest
// The ID of parent directory inode within which to create the child file.
Parent InodeID
@ -316,6 +322,7 @@ func (o *CreateFileOp) toBazilfuseResponse() (bfResp interface{}) {
// return EEXIST (cf. the notes on CreateFileOp and MkDirOp).
type CreateSymlinkOp struct {
commonOp
bfReq *bazilfuse.SymlinkRequest
// The ID of parent directory inode within which to create the child symlink.
Parent InodeID
@ -394,6 +401,7 @@ func (o *CreateSymlinkOp) toBazilfuseResponse() (bfResp interface{}) {
//
type RenameOp struct {
commonOp
bfReq *bazilfuse.RenameRequest
// The old parent directory, and the name of the entry within it to be
// relocated.
@ -419,6 +427,7 @@ func (o *RenameOp) toBazilfuseResponse() (bfResp interface{}) {
// Sample implementation in ext2: ext2_rmdir (http://goo.gl/B9QmFf)
type RmDirOp struct {
commonOp
bfReq *bazilfuse.RemoveRequest
// The ID of parent directory inode, and the name of the directory being
// removed within it.
@ -438,6 +447,7 @@ func (o *RmDirOp) toBazilfuseResponse() (bfResp interface{}) {
// Sample implementation in ext2: ext2_unlink (http://goo.gl/hY6r6C)
type UnlinkOp struct {
commonOp
bfReq *bazilfuse.RemoveRequest
// The ID of parent directory inode, and the name of the entry being removed
// within it.
@ -461,6 +471,7 @@ func (o *UnlinkOp) toBazilfuseResponse() (bfResp interface{}) {
// https://github.com/osxfuse/osxfuse/issues/199).
type OpenDirOp struct {
commonOp
bfReq *bazilfuse.OpenRequest
// The ID of the inode to be opened.
Inode InodeID
@ -491,6 +502,7 @@ func (o *OpenDirOp) toBazilfuseResponse() (bfResp interface{}) {
// Read entries from a directory previously opened with OpenDir.
type ReadDirOp struct {
commonOp
bfReq *bazilfuse.ReadRequest
// The directory inode that we are reading, and the handle previously
// returned by OpenDir when opening that inode.
@ -597,6 +609,7 @@ func (o *ReadDirOp) toBazilfuseResponse() (bfResp interface{}) {
// Errors from this op are ignored by the kernel (cf. http://goo.gl/RL38Do).
type ReleaseDirHandleOp struct {
commonOp
bfReq *bazilfuse.ReleaseRequest
// The handle ID to be released. The kernel guarantees that this ID will not
// be used in further calls to the file system (unless it is reissued by the
@ -620,6 +633,7 @@ func (o *ReleaseDirHandleOp) toBazilfuseResponse() (bfResp interface{}) {
// (cf.https://github.com/osxfuse/osxfuse/issues/199).
type OpenFileOp struct {
commonOp
bfReq *bazilfuse.OpenRequest
// The ID of the inode to be opened.
Inode InodeID
@ -653,6 +667,7 @@ func (o *OpenFileOp) toBazilfuseResponse() (bfResp interface{}) {
// more.
type ReadFileOp struct {
commonOp
bfReq *bazilfuse.ReadRequest
bfResp bazilfuse.ReadResponse
// The file inode that we are reading, and the handle previously returned by
@ -715,6 +730,7 @@ func (o *ReadFileOp) toBazilfuseResponse() (bfResp interface{}) {
// concurrent requests".)
type WriteFileOp struct {
commonOp
bfReq *bazilfuse.WriteRequest
// The file inode that we are modifying, and the handle previously returned
// by CreateFile or OpenFile when opening that inode.
@ -779,6 +795,7 @@ func (o *WriteFileOp) toBazilfuseResponse() (bfResp interface{}) {
// file (but which is not used in "real" file systems).
type SyncFileOp struct {
commonOp
bfReq *bazilfuse.FsyncRequest
// The file and handle being sync'd.
Inode InodeID
@ -838,6 +855,7 @@ func (o *SyncFileOp) toBazilfuseResponse() (bfResp interface{}) {
// return any errors that occur.
type FlushFileOp struct {
commonOp
bfReq *bazilfuse.FlushRequest
// The file and handle being flushed.
Inode InodeID
@ -858,6 +876,7 @@ func (o *FlushFileOp) toBazilfuseResponse() (bfResp interface{}) {
// Errors from this op are ignored by the kernel (cf. http://goo.gl/RL38Do).
type ReleaseFileHandleOp struct {
commonOp
bfReq *bazilfuse.ReleaseRequest
// The handle ID to be released. The kernel guarantees that this ID will not
// be used in further calls to the file system (unless it is reissued by the
@ -891,6 +910,7 @@ func (o *unknownOp) toBazilfuseResponse() (bfResp interface{}) {
// Read the target of a symlink inode.
type ReadSymlinkOp struct {
commonOp
bfReq *bazilfuse.ReadlinkRequest
// The symlink inode that we are reading.
Inode InodeID