linux/fs/overlayfs
Fei Lv 1f6ee9be92 ovl: make fsync after metadata copy-up opt-in mount option
Commit 7d6899fb69 ("ovl: fsync after metadata copy-up") was done to
fix durability of overlayfs copy up on an upper filesystem which does
not enforce ordering on storing of metadata changes (e.g. ubifs).

In an earlier revision of the regressing commit by Lei Lv, the metadata
fsync behavior was opt-in via a new "fsync=strict" mount option.
We were hoping that the opt-in mount option could be avoided, so the
change was only made to depend on metacopy=off, in the hope of not
hurting performance of metadata heavy workloads, which are more likely
to be using metacopy=on.

This hope was proven wrong by a performance regression report from Google
COS workload after upgrade to kernel 6.12.

This is an adaptation of Lei's original "fsync=strict" mount option
to the existing upstream code.

The new mount option is mutually exclusive with the "volatile" mount
option, so the latter is now an alias to the "fsync=volatile" mount
option.

Reported-by: Chenglong Tang <chenglongtang@google.com>
Closes: https://lore.kernel.org/linux-unionfs/CAOdxtTadAFH01Vui1FvWfcmQ8jH1O45owTzUcpYbNvBxnLeM7Q@mail.gmail.com/
Link: https://lore.kernel.org/linux-unionfs/CAOQ4uxgKC1SgjMWre=fUb00v8rxtd6sQi-S+dxR8oDzAuiGu8g@mail.gmail.com/
Fixes: 7d6899fb69 ("ovl: fsync after metadata copy-up")
Depends: 50e638beb6 ("ovl: Use str_on_off() helper in ovl_show_options()")
Cc: stable@vger.kernel.org # v6.12+
Signed-off-by: Fei Lv <feilv@asrmicro.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2026-03-27 12:48:10 +01:00
..
Kconfig fs: prepare for stackable filesystems backing file helpers 2023-12-23 16:35:08 +02:00
Makefile ovl: Move xattr support to new xattrs.c file 2023-10-31 00:12:59 +02:00
copy_up.c ovl: make fsync after metadata copy-up opt-in mount option 2026-03-27 12:48:10 +01:00
dir.c ovl: pass original credentials, not mounter credentials during create 2025-12-05 16:16:20 -08:00
export.c VFS: rename lookup_one_len family to lookup_noperm and remove permission check 2025-04-08 11:24:36 +02:00
file.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
inode.c fs: add support for non-blocking timestamp updates 2026-01-12 14:01:33 +01:00
namei.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
overlayfs.h ovl: make fsync after metadata copy-up opt-in mount option 2026-03-27 12:48:10 +01:00
ovl_entry.h ovl: make fsync after metadata copy-up opt-in mount option 2026-03-27 12:48:10 +01:00
params.c ovl: make fsync after metadata copy-up opt-in mount option 2026-03-27 12:48:10 +01:00
params.h ovl: Prepare for mounting case-insensitive enabled layers 2025-09-23 12:29:35 +02:00
readdir.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
super.c ovl: make fsync after metadata copy-up opt-in mount option 2026-03-27 12:48:10 +01:00
util.c ovl: fix wrong detection of 32bit inode numbers 2026-03-24 16:17:26 +01:00
xattrs.c ovl: port ovl_listxattr() to cred guard 2025-11-19 21:58:24 +01:00