summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi/linux
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2020-08-25 16:38:07 -0700
committergVisor bot <gvisor-bot@google.com>2020-08-25 16:40:02 -0700
commit247dcd62d436943ad0bf8455c2be22bc36da6637 (patch)
tree8b59371a081ccc1a658cc074ee786ffc1ca0b0ef /pkg/abi/linux
parentcb573c8e0bf042ea111dc83c72f25d135623032f (diff)
Return non-zero size for tmpfs statfs(2).
This does not implement accepting or enforcing any size limit, which will be more complex and has performance implications; it just returns a fixed non-zero size. Updates #1936 PiperOrigin-RevId: 328428588
Diffstat (limited to 'pkg/abi/linux')
-rw-r--r--pkg/abi/linux/fs.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/pkg/abi/linux/fs.go b/pkg/abi/linux/fs.go
index 158d2db5b..2b1ef0d4e 100644
--- a/pkg/abi/linux/fs.go
+++ b/pkg/abi/linux/fs.go
@@ -44,17 +44,18 @@ type Statfs struct {
// Type is one of the filesystem magic values, defined above.
Type uint64
- // BlockSize is the data block size.
+ // BlockSize is the optimal transfer block size in bytes.
BlockSize int64
- // Blocks is the number of data blocks in use.
+ // Blocks is the maximum number of data blocks the filesystem may store, in
+ // units of BlockSize.
Blocks uint64
- // BlocksFree is the number of free blocks.
+ // BlocksFree is the number of free data blocks, in units of BlockSize.
BlocksFree uint64
- // BlocksAvailable is the number of blocks free for use by
- // unprivileged users.
+ // BlocksAvailable is the number of data blocks free for use by
+ // unprivileged users, in units of BlockSize.
BlocksAvailable uint64
// Files is the number of used file nodes on the filesystem.