Skip to content

Commit 12be07b

Browse files
authored
rvaultfs: disable direct_io on Darwin; rely on the 'noubc' option. (#35)
1 parent 48cf508 commit 12be07b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/fuse/rvaultfs.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,14 @@ rvaultfs_open_raw(const char *path, struct fuse_file_info *fi, mode_t mode)
118118
return -errno;
119119
}
120120

121-
/* Just use direct I/O i.e. bypass page cache. */
121+
/*
122+
* Use direct I/O i.e. bypass the page cache for extra security.
123+
* This causes abnormal behaviour on Darwin, though; we use the
124+
* '-noubc' parameter there instead.
125+
*/
126+
#if !defined(__APPLE__)
122127
fi->direct_io = true;
123-
fi->keep_cache = false;
128+
#endif
124129

125130
/* Associate the file object with the FUSE file handle. */
126131
static_assert(sizeof(fi->fh) >= sizeof(uintptr_t),

0 commit comments

Comments
 (0)