diff --git a/fuse-overlayfs.h b/fuse-overlayfs.h index 27e29ab..89fbaa1 100644 --- a/fuse-overlayfs.h +++ b/fuse-overlayfs.h @@ -102,6 +102,8 @@ struct ovl_data int squash_to_gid; int static_nlink; + int volatile_mode; + /* current uid/gid*/ uid_t uid; uid_t gid; diff --git a/main.c b/main.c index e7c9208..a171ff7 100644 --- a/main.c +++ b/main.c @@ -231,7 +231,7 @@ static const struct fuse_opt ovl_opts[] = { {"static_nlink", offsetof (struct ovl_data, static_nlink), 1}, {"volatile", /* native overlay supports "volatile" to mean fsync=0. */ - offsetof (struct ovl_data, fsync), 0}, + offsetof (struct ovl_data, volatile_mode), 1}, {"noacl", offsetof (struct ovl_data, noacl), 1}, FUSE_OPT_END @@ -5555,6 +5555,7 @@ main (int argc, char *argv[]) .timeout = 1000000000.0, .timeout_str = NULL, .writeback = 1, + .volatile_mode = 0, }; struct fuse_loop_config fuse_conf = { .clone_fd = 1, @@ -5618,6 +5619,9 @@ main (int argc, char *argv[]) set_limits (); check_can_mknod (&lo); + if (lo.volatile_mode) + lo.fsync = 0; + if (lo.debug) { fprintf (stderr, "uid=%s\n", lo.uid_str ? : "unchanged");