Skip to content

Commit

Permalink
rvaultfs: disable direct_io on Darwin; rely on the 'noubc' option. (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmind committed Mar 4, 2020
1 parent 48cf508 commit 12be07b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/fuse/rvaultfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,14 @@ rvaultfs_open_raw(const char *path, struct fuse_file_info *fi, mode_t mode)
return -errno;
}

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

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

0 comments on commit 12be07b

Please sign in to comment.