fuse: add `SyncRead` flag to MountOptions to ensure in-order reads
We enable FUSE_CAP_ASYNC_READ per default, which means that the kernel can (and does) submit multiple concurrent out-of-order read requests to service userspace reads and kernel readahead. For some backing storages, like Amazon Cloud Drive, out-of-order reads are expensive. gocryptfs has implemented a delay-based workaround with its `-serialize_reads` flag for this case (see https://github.com/rfjakob/gocryptfs/issues/92 for details). Not enabling FUSE_CAP_ASYNC_READ makes the kernel do this for us, as verified by adding debug output to gocryptfs, so expose it as a mount flag in MountOptions. Fixes: https://github.com/hanwen/go-fuse/issues/140 Graphs-at: https://github.com/hanwen/go-fuse/issues/395 Related: https://github.com/rfjakob/gocryptfs/issues/92 Change-Id: I10f947d71e1453989c4a9b66fbb0407f7163994f
Showing
Please register or sign in to comment