summaryrefslogtreecommitdiff
path: root/9ns/src/bridge.zig
diff options
context:
space:
mode:
Diffstat (limited to '9ns/src/bridge.zig')
-rw-r--r--9ns/src/bridge.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/9ns/src/bridge.zig b/9ns/src/bridge.zig
index 07bd5d8..97e0882 100644
--- a/9ns/src/bridge.zig
+++ b/9ns/src/bridge.zig
@@ -643,8 +643,8 @@ const Bridge = struct {
fn openFlags(is_dir: bool, stream: bool, direct_io: bool) u32 {
if (is_dir) return 0;
- if (stream) return fuse.FOPEN_DIRECT_IO | fuse.FOPEN_NONSEEKABLE;
- return if (direct_io) fuse.FOPEN_DIRECT_IO else 0;
+ if (stream) return fuse.FOPEN_DIRECT_IO | fuse.FOPEN_NONSEEKABLE | fuse.FOPEN_PARALLEL_DIRECT_WRITES;
+ return if (direct_io) fuse.FOPEN_DIRECT_IO | fuse.FOPEN_PARALLEL_DIRECT_WRITES else 0;
}
fn newHandle(b: *Bridge, fid: u32, nodeid: u64) HandlerError!u64 {
@@ -2581,8 +2581,8 @@ test "attr mapping: DMDIR → S_IFDIR|perm, length → size/blocks" {
test "a file whose stat length is 0 opens direct and nonseekable, whatever the cache option" {
for ([_]bool{ false, true }) |direct_io| {
- try std.testing.expectEqual(fuse.FOPEN_DIRECT_IO | fuse.FOPEN_NONSEEKABLE, Bridge.openFlags(false, true, direct_io));
- try std.testing.expectEqual(@as(u32, if (direct_io) fuse.FOPEN_DIRECT_IO else 0), Bridge.openFlags(false, false, direct_io));
+ try std.testing.expectEqual(fuse.FOPEN_DIRECT_IO | fuse.FOPEN_NONSEEKABLE | fuse.FOPEN_PARALLEL_DIRECT_WRITES, Bridge.openFlags(false, true, direct_io));
+ try std.testing.expectEqual(@as(u32, if (direct_io) fuse.FOPEN_DIRECT_IO | fuse.FOPEN_PARALLEL_DIRECT_WRITES else 0), Bridge.openFlags(false, false, direct_io));
try std.testing.expectEqual(@as(u32, 0), Bridge.openFlags(true, true, direct_io));
}
}