From 348ed9e731d013c43ea857ac6a9e1330e99faaa0 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Wed, 5 Aug 2015 01:07:40 +0000 Subject: [PATCH] Disabled async reads. Allowing the kernel to send multiple reads for the same file handle concurrently interferes with sequential read detection like that in GoogleCloudPlatform/gcsfuse#103. --- connection.go | 4 ---- samples/interruptfs/interrupt_fs_test.go | 13 ------------- 2 files changed, 17 deletions(-) diff --git a/connection.go b/connection.go index 3ff7a5d..021f4a2 100644 --- a/connection.go +++ b/connection.go @@ -165,10 +165,6 @@ func (c *Connection) Init() (err error) { // Tell the kernel not to use pitifully small 4 KiB writes. initOp.Flags |= fusekernel.InitBigWrites - // Tell the kernel it is free to send further requests while a read request - // is in flight. - initOp.Flags |= fusekernel.InitAsyncRead - c.Reply(ctx, nil) return } diff --git a/samples/interruptfs/interrupt_fs_test.go b/samples/interruptfs/interrupt_fs_test.go index 0ede205..089e2da 100644 --- a/samples/interruptfs/interrupt_fs_test.go +++ b/samples/interruptfs/interrupt_fs_test.go @@ -19,7 +19,6 @@ import ( "os" "os/exec" "path" - "runtime" "testing" "time" @@ -73,18 +72,6 @@ func (t *InterruptFSTest) StatFoo() { } func (t *InterruptFSTest) InterruptedDuringRead() { - // On Linux, since we have async reads enabled, the kernel sends the read and - // the flush ops in parallel. When the process receives SIGINT, the interrupt - // is delivered only for the flush, probably because that's what the process - // appears to be blocking on. So this test doesn't work. - // - // Note that this means that cancellation is not delivered for reads on - // Linux. This is unfortunate, but probably worth it due to the significant - // increase in performance. - if runtime.GOOS == "linux" { - return - } - var err error t.fs.EnableReadBlocking()