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
6565b52b
Commit
6565b52b
authored
Sep 10, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the documentation to match reality on darwin.
parent
33a476ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
25 deletions
+29
-25
fuseops/ops.go
fuseops/ops.go
+12
-4
samples/statfs/statfs_darwin_test.go
samples/statfs/statfs_darwin_test.go
+17
-21
No files found.
fuseops/ops.go
View file @
6565b52b
...
@@ -51,9 +51,16 @@ type StatFSOp struct {
...
@@ -51,9 +51,16 @@ type StatFSOp struct {
// of f_frsize. On OS X this is surfaced as statfs::f_bsize, which plays the
// of f_frsize. On OS X this is surfaced as statfs::f_bsize, which plays the
// same roll.
// same roll.
//
//
// It appears as though the original intent of statvfs::f_frsize in the posix
// standard was to support a smaller addressable unit than statvfs::f_bsize
// (cf. The Linux Programming Interface by Michael Kerrisk,
// https://goo.gl/5LZMxQ). Therefore users should probably arrange for this
// to be no larger than IoSize.
//
// On Linux this can be any value, and will be faithfully returned to the
// On Linux this can be any value, and will be faithfully returned to the
// caller of statfs(2) (see the code walk above). On OS X it appears it must
// caller of statfs(2) (see the code walk above). On OS X it appears that
// be a power of 2 in the range [2^9, 2^17].
// only powers of 2 in the range [2^9, 2^17] are preserved, and a value of
// zero is treated as 4096.
//
//
// This interface does not distinguish between blocks and block fragments.
// This interface does not distinguish between blocks and block fragments.
BlockSize
uint32
BlockSize
uint32
...
@@ -77,8 +84,9 @@ type StatFSOp struct {
...
@@ -77,8 +84,9 @@ type StatFSOp struct {
// statfs::f_iosize. Both are documented in `man 2 statfs` as "optimal
// statfs::f_iosize. Both are documented in `man 2 statfs` as "optimal
// transfer block size".
// transfer block size".
//
//
// On Linux this can be any value. On OS X it appears it must be a power of 2
// On Linux this can be any value. On OS X it appears that only powers of 2
// in the range [2^9, 2^20].
// in the range [2^12, 2^20] are faithfully preserved, and a value of zero is
// treated as 65536.
IoSize
uint32
IoSize
uint32
// The total number of inodes in the file system, and how many remain free.
// The total number of inodes in the file system, and how many remain free.
...
...
samples/statfs/statfs_darwin_test.go
View file @
6565b52b
...
@@ -170,27 +170,23 @@ func (t *StatFSTest) IoSizes() {
...
@@ -170,27 +170,23 @@ func (t *StatFSTest) IoSizes() {
fsIoSize
uint32
fsIoSize
uint32
expectedIosize
uint32
expectedIosize
uint32
}{
}{
0
:
{
0
,
4096
},
0
:
{
0
,
65536
},
1
:
{
1
,
512
},
1
:
{
1
,
4096
},
2
:
{
3
,
512
},
2
:
{
3
,
4096
},
3
:
{
511
,
512
},
3
:
{
4095
,
4096
},
4
:
{
512
,
512
},
4
:
{
4096
,
4096
},
5
:
{
513
,
1024
},
5
:
{
4097
,
8192
},
6
:
{
1023
,
1024
},
6
:
{
8191
,
8192
},
7
:
{
1024
,
1024
},
7
:
{
8192
,
8192
},
8
:
{
4095
,
4096
},
8
:
{
8193
,
16384
},
9
:
{
1
<<
16
,
1
<<
16
},
9
:
{
1
<<
20
-
1
,
1
<<
20
},
10
:
{
1
<<
17
-
1
,
1
<<
17
},
10
:
{
1
<<
20
,
1
<<
20
},
11
:
{
1
<<
17
,
1
<<
17
},
11
:
{
1
<<
20
+
1
,
1
<<
20
},
12
:
{
1
<<
17
+
1
,
1
<<
18
},
12
:
{
math
.
MaxInt32
-
1
,
1
<<
20
},
13
:
{
1
<<
20
-
1
,
1
<<
20
},
13
:
{
math
.
MaxInt32
,
1
<<
20
},
14
:
{
1
<<
20
,
1
<<
20
},
14
:
{
math
.
MaxInt32
+
1
,
4096
},
15
:
{
1
<<
20
+
1
,
1
<<
20
},
15
:
{
math
.
MaxInt32
+
1
<<
15
,
1
<<
15
},
16
:
{
math
.
MaxInt32
-
1
,
1
<<
20
},
16
:
{
math
.
MaxUint32
,
1
<<
20
},
17
:
{
math
.
MaxInt32
,
1
<<
20
},
18
:
{
math
.
MaxInt32
+
1
,
512
},
19
:
{
math
.
MaxInt32
+
1
<<
15
,
1
<<
15
},
20
:
{
math
.
MaxUint32
,
1
<<
20
},
}
}
for
i
,
tc
:=
range
testCases
{
for
i
,
tc
:=
range
testCases
{
...
...
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