Commit 0c3881b5 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Run gofmt.

parent 8c884fd9
......@@ -134,7 +134,7 @@ func TestingBOnePass(b *testing.B, threads int, files []string) (results []float
return results
}
// Add this so we can estimate impact on latency numbers.
// Add this so we can estimate impact on latency numbers.
func BenchmarkTimeNow(b *testing.B) {
for i := 0; i < b.N; i++ {
time.Now()
......
......@@ -147,12 +147,12 @@ func setupFAttrTest(t *testing.T, fs FileSystem) (dir string, clean func(), sync
}
return dir, func() {
if state.Unmount() == nil {
os.RemoveAll(dir)
if state.Unmount() == nil {
os.RemoveAll(dir)
}
}, func() {
state.ThreadSanitizerSync()
}
}, func() {
state.ThreadSanitizerSync()
}
}
func TestDataReadLarge(t *testing.T) {
......
......@@ -247,7 +247,7 @@ func (m *int64HandleMap) Has(handle uint64) bool {
func (m *int64HandleMap) Decode(handle uint64) (val *Handled) {
ptrBits := uintptr(handle & (1<<45 - 1))
check := uint32(handle >> 45)
val = (*Handled)(unsafe.Pointer(ptrBits<<3))
val = (*Handled)(unsafe.Pointer(ptrBits << 3))
if val.check != check {
msg := fmt.Sprintf("handle check mismatch; handle has 0x%x, object has 0x%x: %v",
check, val.check, val.object)
......
......@@ -34,14 +34,14 @@ type MountState struct {
latencies *LatencyMap
opts *MountOptions
opts *MountOptions
reqMu sync.Mutex
reqPool []*request
readPool [][]byte
reqReaders int
outstandingReadBufs int
kernelSettings raw.InitIn
kernelSettings raw.InitIn
canSplice bool
loops sync.WaitGroup
......
......@@ -5,7 +5,7 @@ import (
"path/filepath"
)
// PrefixFileSystem adds a path prefix to incoming calls.
// PrefixFileSystem adds a path prefix to incoming calls.
type PrefixFileSystem struct {
FileSystem
Prefix string
......
......@@ -52,14 +52,14 @@ type AutoUnionFsOptions struct {
}
const (
_READONLY = "READONLY"
_STATUS = "status"
_CONFIG = "config"
_DEBUG = "debug"
_READONLY = "READONLY"
_STATUS = "status"
_CONFIG = "config"
_DEBUG = "debug"
_DEBUG_SETTING = "debug_setting"
_ROOT = "root"
_VERSION = "gounionfs_version"
_SCAN_CONFIG = ".scan_config"
_ROOT = "root"
_VERSION = "gounionfs_version"
_SCAN_CONFIG = ".scan_config"
)
func NewAutoUnionFs(directory string, options AutoUnionFsOptions) *AutoUnionFs {
......
......@@ -304,7 +304,7 @@ func TestUnionFsBasic(t *testing.T) {
names = dirNames(wd + "/rw")
checkMapEq(t, names, map[string]bool{
testOpts.DeletionDirName: true,
"rw": true, "ro1": true,
"rw": true, "ro1": true,
})
names = dirNames(wd + "/rw/" + testOpts.DeletionDirName)
if len(names) != 0 {
......
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