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
c49a7e13
Commit
c49a7e13
authored
Sep 09, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added and documented StatfsOp.
parent
284ddf44
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
fuseops/ops.go
fuseops/ops.go
+37
-0
No files found.
fuseops/ops.go
View file @
c49a7e13
...
...
@@ -19,6 +19,43 @@ import (
"time"
)
////////////////////////////////////////////////////////////////////////
// File system
////////////////////////////////////////////////////////////////////////
// Return statistics about the file system's capacity and available resources.
//
// Called by statfs(2) and friends:
//
// * (https://goo.gl/Xi1lDr) sys_statfs called user_statfs, which calls
// vfs_statfs, which calls statfs_by_dentry.
//
// * (https://goo.gl/VAIOwU) statfs_by_dentry calls the superblock
// operation statfs, which in our case points at
// fuse_statfs (cf. https://goo.gl/L7BTM3)
//
// * (https://goo.gl/Zn7Sgl) fuse_statfs sends a statfs op, then uses
// convert_fuse_statfs to convert the response in a straightforward
// manner.
//
// Note that this op is particularly important on OS X: if you don't implement
// it, the file system will not successfully mount. If you don't model a sane
// amount of free space, the Finder will refuse to copy files into the file
// system.
type
StatfsOp
struct
{
// The size of the file system's blocks, and how many there are in total.
BlockSize
uint32
Blocks
uint64
// The number of blocks free, and how many are available to non-root users.
BlocksFree
uint64
BlocksAvailable
uint64
// The total number of inodes in the file system, and how many remain free.
Inodes
uint64
InodesFree
uint64
}
////////////////////////////////////////////////////////////////////////
// Inodes
////////////////////////////////////////////////////////////////////////
...
...
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