main: honor option volatile

upstream Linux added an option "volatile" for overlay mounts that has
the same meaning as fsync=0 already supported by fuse-overlayfs.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2020-10-21 18:03:00 +02:00
parent 80d0ed6499
commit 589e363cc8
No known key found for this signature in database
GPG Key ID: E4730F97F60286ED

3
main.c
View File

@ -220,6 +220,8 @@ static const struct fuse_opt ovl_opts[] = {
offsetof (struct ovl_data, xattr_permissions), 0},
{"squash_to_root",
offsetof (struct ovl_data, squash_to_root), 1},
{"volatile", /* native overlay supports "volatile" to mean fsync=0. */
offsetof (struct ovl_data, fsync), 0},
FUSE_OPT_END
};
@ -5476,6 +5478,7 @@ main (int argc, char *argv[])
fprintf (stderr, "lowerdir=%s\n", lo.lowerdir);
fprintf (stderr, "mountpoint=%s\n", lo.mountpoint);
fprintf (stderr, "plugins=%s\n", lo.plugins ? lo.plugins : "<none>");
fprintf (stderr, "fsync=%s\n", lo.fsync ? "enabled" : "disabled");
}
lo.uid_mappings = lo.uid_str ? read_mappings (lo.uid_str) : NULL;