statFS.StatFS

geesefs-0-30-9
Aaron Jacobs 2015-09-09 13:42:15 +10:00
parent b316df06d5
commit da3ee9802b
1 changed files with 6 additions and 11 deletions

View File

@ -103,19 +103,14 @@ func (fs *statFS) MostRecentWriteSize() int {
// FileSystem methods // FileSystem methods
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
func (fs *statFS) LookUpInode( // LOCKS_EXCLUDED(fs.mu)
func (fs *statFS) StatFS(
ctx context.Context, ctx context.Context,
op *fuseops.LookUpInodeOp) (err error) { op *fuseops.StatFSOp) (err error) {
// Pretend that every name exists as a child of the root inode, and is a fs.mu.Lock()
// file. defer fs.mu.Unlock()
if op.Parent != fuseops.RootInodeID {
err = fuse.ENOENT
return
}
op.Entry.Child = childInodeID
op.Entry.Attributes = fileAttrs()
*op = fs.cannedResponse
return return
} }