Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-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
Levin Zimmermann
go-fuse
Commits
51f7cee9
Commit
51f7cee9
authored
Mar 21, 2013
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all: run gofmt.
parent
408ce31f
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
76 additions
and
83 deletions
+76
-83
fuse/fsconnector.go
fuse/fsconnector.go
+3
-3
fuse/handle.go
fuse/handle.go
+1
-1
fuse/pressure_test.go
fuse/pressure_test.go
+2
-2
raw/constants_linux.go
raw/constants_linux.go
+0
-1
raw/print.go
raw/print.go
+14
-15
raw/print_darwin.go
raw/print_darwin.go
+1
-1
raw/print_linux.go
raw/print_linux.go
+1
-0
raw/types.go
raw/types.go
+18
-20
raw/types_darwin.go
raw/types_darwin.go
+27
-27
raw/types_linux.go
raw/types_linux.go
+2
-4
splice/pair.go
splice/pair.go
+1
-4
splice/pair_darwin.go
splice/pair_darwin.go
+1
-2
unionfs/unionfs_test.go
unionfs/unionfs_test.go
+5
-3
No files found.
fuse/fsconnector.go
View file @
51f7cee9
...
...
@@ -343,7 +343,7 @@ func (c *FileSystemConnector) Unmount(node *Inode) Status {
// This operation is rare, so we kludge it to avoid
// contention.
time
.
Sleep
(
delay
)
delay
=
delay
*
2
+
1
delay
=
delay
*
2
+
1
if
!
c
.
inodeMap
.
Has
(
nodeId
)
{
break
}
...
...
@@ -351,10 +351,10 @@ func (c *FileSystemConnector) Unmount(node *Inode) Status {
parentNode
.
mount
.
treeLock
.
Lock
()
mount
.
treeLock
.
Lock
()
}
mount
.
mountInode
=
nil
node
.
mountPoint
=
nil
return
OK
}
...
...
fuse/handle.go
View file @
51f7cee9
...
...
@@ -8,7 +8,7 @@ import (
)
// HandleMap translates objects in Go space to 64-bit handles that can
// be given out to -say- the linux kernel.
// be given out to -say- the linux kernel.
//
// The 32 bits version of this is a threadsafe wrapper around a map.
//
...
...
fuse/pressure_test.go
View file @
51f7cee9
...
...
@@ -78,7 +78,7 @@ func TestMemoryPressure(t *testing.T) {
}(
i
)
}
time
.
Sleep
(
100
*
time
.
Millisecond
)
state
.
reqMu
.
Lock
()
bufs
.
lock
.
Lock
()
created
:=
bufs
.
createdBuffers
+
state
.
outstandingReadBufs
...
...
@@ -87,7 +87,7 @@ func TestMemoryPressure(t *testing.T) {
t
.
Logf
(
"Have %d read bufs"
,
state
.
outstandingReadBufs
)
// +1 due to batch forget?
if
created
>
_MAX_READERS
+
1
{
if
created
>
_MAX_READERS
+
1
{
t
.
Errorf
(
"created %d buffers, max reader %d"
,
created
,
_MAX_READERS
)
}
...
...
raw/constants_linux.go
View file @
51f7cee9
...
...
@@ -6,4 +6,3 @@ import (
const
syscall_O_LARGEFILE
=
syscall
.
O_LARGEFILE
const
syscall_O_NOATIME
=
syscall
.
O_NOATIME
raw/print.go
View file @
51f7cee9
...
...
@@ -24,22 +24,21 @@ func init() {
READ_LOCKOWNER
:
"LOCKOWNER"
,
}
initFlagNames
=
map
[
int64
]
string
{
CAP_ASYNC_READ
:
"ASYNC_READ"
,
CAP_POSIX_LOCKS
:
"POSIX_LOCKS"
,
CAP_FILE_OPS
:
"FILE_OPS"
,
CAP_ATOMIC_O_TRUNC
:
"ATOMIC_O_TRUNC"
,
CAP_EXPORT_SUPPORT
:
"EXPORT_SUPPORT"
,
CAP_BIG_WRITES
:
"BIG_WRITES"
,
CAP_DONT_MASK
:
"DONT_MASK"
,
CAP_SPLICE_WRITE
:
"SPLICE_WRITE"
,
CAP_SPLICE_MOVE
:
"SPLICE_MOVE"
,
CAP_SPLICE_READ
:
"SPLICE_READ"
,
CAP_FLOCK_LOCKS
:
"FLOCK_LOCKS"
,
CAP_IOCTL_DIR
:
"IOCTL_DIR"
,
CAP_AUTO_INVAL_DATA
:
"AUTO_INVAL_DATA"
,
CAP_READDIRPLUS
:
"READDIRPLUS"
,
CAP_ASYNC_READ
:
"ASYNC_READ"
,
CAP_POSIX_LOCKS
:
"POSIX_LOCKS"
,
CAP_FILE_OPS
:
"FILE_OPS"
,
CAP_ATOMIC_O_TRUNC
:
"ATOMIC_O_TRUNC"
,
CAP_EXPORT_SUPPORT
:
"EXPORT_SUPPORT"
,
CAP_BIG_WRITES
:
"BIG_WRITES"
,
CAP_DONT_MASK
:
"DONT_MASK"
,
CAP_SPLICE_WRITE
:
"SPLICE_WRITE"
,
CAP_SPLICE_MOVE
:
"SPLICE_MOVE"
,
CAP_SPLICE_READ
:
"SPLICE_READ"
,
CAP_FLOCK_LOCKS
:
"FLOCK_LOCKS"
,
CAP_IOCTL_DIR
:
"IOCTL_DIR"
,
CAP_AUTO_INVAL_DATA
:
"AUTO_INVAL_DATA"
,
CAP_READDIRPLUS
:
"READDIRPLUS"
,
CAP_READDIRPLUS_AUTO
:
"READDIRPLUS_AUTO"
,
}
releaseFlagNames
=
map
[
int64
]
string
{
RELEASE_FLUSH
:
"FLUSH"
,
...
...
raw/print_darwin.go
View file @
51f7cee9
package
raw
import
(
"fmt"
)
func
init
()
{
...
...
raw/print_linux.go
View file @
51f7cee9
package
raw
import
(
"fmt"
"syscall"
...
...
raw/types.go
View file @
51f7cee9
...
...
@@ -92,8 +92,6 @@ const (
FOPEN_DIRECT_IO
=
(
1
<<
0
)
FOPEN_KEEP_CACHE
=
(
1
<<
1
)
FOPEN_NONSEEKABLE
=
(
1
<<
2
)
)
type
OpenOut
struct
{
...
...
@@ -104,20 +102,20 @@ type OpenOut struct {
// To be set in InitIn/InitOut.Flags.
const
(
CAP_ASYNC_READ
=
(
1
<<
0
)
CAP_POSIX_LOCKS
=
(
1
<<
1
)
CAP_FILE_OPS
=
(
1
<<
2
)
CAP_ATOMIC_O_TRUNC
=
(
1
<<
3
)
CAP_EXPORT_SUPPORT
=
(
1
<<
4
)
CAP_BIG_WRITES
=
(
1
<<
5
)
CAP_DONT_MASK
=
(
1
<<
6
)
CAP_SPLICE_WRITE
=
(
1
<<
7
)
CAP_SPLICE_MOVE
=
(
1
<<
8
)
CAP_SPLICE_READ
=
(
1
<<
9
)
CAP_FLOCK_LOCKS
=
(
1
<<
10
)
CAP_IOCTL_DIR
=
(
1
<<
11
)
CAP_AUTO_INVAL_DATA
=
(
1
<<
12
)
CAP_READDIRPLUS
=
(
1
<<
13
)
CAP_ASYNC_READ
=
(
1
<<
0
)
CAP_POSIX_LOCKS
=
(
1
<<
1
)
CAP_FILE_OPS
=
(
1
<<
2
)
CAP_ATOMIC_O_TRUNC
=
(
1
<<
3
)
CAP_EXPORT_SUPPORT
=
(
1
<<
4
)
CAP_BIG_WRITES
=
(
1
<<
5
)
CAP_DONT_MASK
=
(
1
<<
6
)
CAP_SPLICE_WRITE
=
(
1
<<
7
)
CAP_SPLICE_MOVE
=
(
1
<<
8
)
CAP_SPLICE_READ
=
(
1
<<
9
)
CAP_FLOCK_LOCKS
=
(
1
<<
10
)
CAP_IOCTL_DIR
=
(
1
<<
11
)
CAP_AUTO_INVAL_DATA
=
(
1
<<
12
)
CAP_READDIRPLUS
=
(
1
<<
13
)
CAP_READDIRPLUS_AUTO
=
(
1
<<
14
)
)
...
...
@@ -382,9 +380,9 @@ const (
)
type
FallocateIn
struct
{
Fh
uint64
Offset
uint64
Length
uint64
Mode
uint32
Fh
uint64
Offset
uint64
Length
uint64
Mode
uint32
Padding
uint32
}
raw/types_darwin.go
View file @
51f7cee9
package
raw
type
Attr
struct
{
Ino
uint64
Size
uint64
Blocks
uint64
Atime
uint64
Mtime
uint64
Ctime
uint64
Crtime_
uint64
// OS X
Atimensec
uint32
Mtimensec
uint32
Ctimensec
uint32
Ino
uint64
Size
uint64
Blocks
uint64
Atime
uint64
Mtime
uint64
Ctime
uint64
Crtime_
uint64
// OS X
Atimensec
uint32
Mtimensec
uint32
Ctimensec
uint32
Crtimensec_
uint32
// OS X
Mode
uint32
Nlink
uint32
Mode
uint32
Nlink
uint32
Owner
Rdev
uint32
Flags_
uint32
// OS X
Rdev
uint32
Flags_
uint32
// OS X
}
const
(
FATTR_CRTIME
=
(
1
<<
28
)
FATTR_CHGTIME
=
(
1
<<
29
)
FATTR_BKUPTIME
=
(
1
<<
30
)
FATTR_FLAGS
=
(
1
<<
31
)
FATTR_CRTIME
=
(
1
<<
28
)
FATTR_CHGTIME
=
(
1
<<
29
)
FATTR_BKUPTIME
=
(
1
<<
30
)
FATTR_FLAGS
=
(
1
<<
31
)
)
type
SetAttrIn
struct
{
...
...
@@ -40,8 +40,8 @@ type SetAttrIn struct {
}
const
(
FOPEN_PURGE_ATTR
=
(
1
<<
30
)
FOPEN_PURGE_UBC
=
(
1
<<
31
)
FOPEN_PURGE_ATTR
=
(
1
<<
30
)
FOPEN_PURGE_UBC
=
(
1
<<
31
)
)
// compat with linux.
...
...
@@ -82,14 +82,14 @@ const (
)
type
GetxtimesOut
struct
{
Bkuptime
uint64
Crtime
uint64
Bkuptime
uint64
Crtime
uint64
Bkuptimensec
uint32
Crtimensec
uint32
Crtimensec
uint32
}
type
ExchangeIn
struct
{
Olddir
uint64
Newdir
uint64
Options
uint64
type
ExchangeIn
struct
{
Olddir
uint64
Newdir
uint64
Options
uint64
}
raw/types_linux.go
View file @
51f7cee9
...
...
@@ -29,19 +29,18 @@ const (
type
GetAttrIn
struct
{
Flags_
uint32
Dummy
uint32
Dummy
uint32
Fh_
uint64
}
func
(
g
*
GetAttrIn
)
Flags
()
uint32
{
return
g
.
Flags_
return
g
.
Flags_
}
func
(
g
*
GetAttrIn
)
Fh
()
uint64
{
return
g
.
Fh_
}
type
ReadIn
struct
{
Fh
uint64
Offset
uint64
...
...
@@ -52,7 +51,6 @@ type ReadIn struct {
Padding
uint32
}
type
WriteIn
struct
{
Fh
uint64
Offset
uint64
...
...
splice/pair.go
View file @
51f7cee9
...
...
@@ -11,11 +11,10 @@ type Pair struct {
}
func
(
p
*
Pair
)
MaxGrow
()
{
for
p
.
Grow
(
2
*
p
.
size
)
==
nil
{
for
p
.
Grow
(
2
*
p
.
size
)
==
nil
{
}
}
func
(
p
*
Pair
)
Grow
(
n
int
)
error
{
if
n
<=
p
.
size
{
return
nil
...
...
@@ -63,5 +62,3 @@ func (p *Pair) WriteFd() uintptr {
func
(
p
*
Pair
)
Write
(
d
[]
byte
)
(
n
int
,
err
error
)
{
return
p
.
w
.
Write
(
d
)
}
splice/pair_darwin.go
View file @
51f7cee9
package
splice
import
(
)
import
()
func
(
p
*
Pair
)
LoadFromAt
(
fd
uintptr
,
sz
int
,
off
int64
)
(
int
,
error
)
{
panic
(
"not implemented"
)
...
...
unionfs/unionfs_test.go
View file @
51f7cee9
...
...
@@ -9,8 +9,8 @@ import (
"os/exec"
"path/filepath"
"regexp"
"strings"
"strconv"
"strings"
"syscall"
"testing"
"time"
...
...
@@ -44,7 +44,9 @@ func setRecursiveWritable(t *testing.T, dir string, writable bool) {
}
else
{
newMode
=
uint32
(
fi
.
Mode
()
.
Perm
())
&^
0222
}
if
fi
.
Mode
()
|
os
.
ModeSymlink
!=
0
{
return
nil
}
if
fi
.
Mode
()
|
os
.
ModeSymlink
!=
0
{
return
nil
}
return
os
.
Chmod
(
path
,
os
.
FileMode
(
newMode
))
})
if
err
!=
nil
{
...
...
@@ -950,7 +952,7 @@ func TestUnionFsRmRf(t *testing.T) {
if
err
!=
nil
{
t
.
Logf
(
"ProgramVersion failed: %v"
,
err
)
}
if
maj
<
8
{
// assuming GNU coreutils.
if
maj
<
8
{
// assuming GNU coreutils.
t
.
Skipf
(
"Skipping test; GNU rm %d.%d is not POSIX compliant."
,
maj
,
min
)
}
command
:=
fmt
.
Sprintf
(
"%s -f %s/mnt/dir"
,
bin
,
wd
)
...
...
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