Commit 51f7cee9 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

all: run gofmt.

parent 408ce31f
......@@ -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
}
......
......@@ -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)
}
......
......@@ -6,4 +6,3 @@ import (
const syscall_O_LARGEFILE = syscall.O_LARGEFILE
const syscall_O_NOATIME = syscall.O_NOATIME
......@@ -39,7 +39,6 @@ func init() {
CAP_AUTO_INVAL_DATA: "AUTO_INVAL_DATA",
CAP_READDIRPLUS: "READDIRPLUS",
CAP_READDIRPLUS_AUTO: "READDIRPLUS_AUTO",
}
releaseFlagNames = map[int64]string{
RELEASE_FLUSH: "FLUSH",
......
package raw
import (
"fmt"
)
func init() {
......
package raw
import (
"fmt"
"syscall"
......
......@@ -92,8 +92,6 @@ const (
FOPEN_DIRECT_IO = (1 << 0)
FOPEN_KEEP_CACHE = (1 << 1)
FOPEN_NONSEEKABLE = (1 << 2)
)
type OpenOut struct {
......
......@@ -40,7 +40,7 @@ type SetAttrIn struct {
}
const (
FOPEN_PURGE_ATTR =(1 << 30)
FOPEN_PURGE_ATTR = (1 << 30)
FOPEN_PURGE_UBC = (1 << 31)
)
......
......@@ -41,7 +41,6 @@ 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
......
......@@ -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)
}
package splice
import (
)
import ()
func (p *Pair) LoadFromAt(fd uintptr, sz int, off int64) (int, error) {
panic("not implemented")
......
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment