]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ovl: make fsync after metadata copy-up opt-in mount option
authorFei Lv <feilv@asrmicro.com>
Mon, 22 Jul 2024 10:14:43 +0000 (18:14 +0800)
committerAmir Goldstein <amir73il@gmail.com>
Fri, 27 Mar 2026 11:48:10 +0000 (12:48 +0100)
commit1f6ee9be92f8df85a8c9a5a78c20fd39c0c21a95
tree1942a1a902720e5e6f25e612eb468a1f229400e2
parent53a7c171e9dd833f0a96b545adcb89bd57387239
ovl: make fsync after metadata copy-up opt-in mount option

Commit 7d6899fb69d25 ("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: 7d6899fb69d25 ("ovl: fsync after metadata copy-up")
Depends: 50e638beb67e0 ("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>
Documentation/filesystems/overlayfs.rst
fs/overlayfs/copy_up.c
fs/overlayfs/overlayfs.h
fs/overlayfs/ovl_entry.h
fs/overlayfs/params.c
fs/overlayfs/super.c