diff options
author | Amir Goldstein <amir73il@gmail.com> | 2024-08-29 17:51:08 +0200 |
---|---|---|
committer | Amir Goldstein <amir73il@gmail.com> | 2024-08-30 14:18:37 +0200 |
commit | 7d6899fb69d25e1bc6f4700b7c1d92e6b608593d (patch) | |
tree | fb547e20be992b1744bcd05d3831c024b1fb37b3 /kernel/cgroup | |
parent | 34b4540e6646577d02afacfcbc08e563b7d69a9f (diff) |
ovl: fsync after metadata copy-up
For upper filesystems which do not use strict ordering of persisting
metadata changes (e.g. ubifs), when overlayfs file is modified for
the first time, copy up will create a copy of the lower file and
its parent directories in the upper layer. Permission lost of the
new upper parent directory was observed during power-cut stress test.
Fix by moving the fsync call to after metadata copy to make sure that the
metadata copied up directory and files persists to disk before renaming
from tmp to final destination.
With metacopy enabled, this change will hurt performance of workloads
such as chown -R, so we keep the legacy behavior of fsync only on copyup
of data.
Link: https://lore.kernel.org/linux-unionfs/CAOQ4uxj-pOvmw1-uXR3qVdqtLjSkwcR9nVKcNU_vC10Zyf2miQ@mail.gmail.com/
Reported-and-tested-by: Fei Lv <feilv@asrmicro.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Diffstat (limited to 'kernel/cgroup')
0 files changed, 0 insertions, 0 deletions