This documents behaviour that was discussed in a thread about the volatile feature. Specifically, how failures can go hidden from asynchronous writes (such as from mmap, or writes that are not immediately flushed to the filesystem). Although we pass through calls like msync, fallocate, and write, and will still return errors on those, it doesn't guarantee all kinds of errors will happen at those times, and thus may hide errors. In the future, we can add error checking to all interactions with the upperdir, and pass through errseq_t from the upperdir on mappings, and other interactions with the filesystem[1]. [1]: https://lore.kernel.org/linux-unionfs/20201116045758.21774-1-sargun@xxxxxxxxx/T/#m7d501f375e031056efad626e471a1392dd3aad33 Signed-off-by: Sargun Dhillon <sargun@xxxxxxxxx> Cc: linux-fsdevel@xxxxxxxxxxxxxxx Cc: linux-unionfs@xxxxxxxxxxxxxxx Cc: Miklos Szeredi <miklos@xxxxxxxxxx> Cc: Amir Goldstein <amir73il@xxxxxxxxx> Cc: Vivek Goyal <vgoyal@xxxxxxxxxx> --- Documentation/filesystems/overlayfs.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/filesystems/overlayfs.rst b/Documentation/filesystems/overlayfs.rst index 580ab9a0fe31..c6e30c1bc2f2 100644 --- a/Documentation/filesystems/overlayfs.rst +++ b/Documentation/filesystems/overlayfs.rst @@ -570,7 +570,11 @@ Volatile mount This is enabled with the "volatile" mount option. Volatile mounts are not guaranteed to survive a crash. It is strongly recommended that volatile mounts are only used if data written to the overlay can be recreated -without significant effort. +without significant effort. In addition to this, the sync family of syscalls +are not sufficient to determine whether a write failed as sync calls are +omitted. For this reason, it is important that the filesystem used by the +upperdir handles failure in a fashion that's suitable for the user. For +example, upon detecting a fault, ext4 can be configured to panic. The advantage of mounting with the "volatile" option is that all forms of sync calls to the upper filesystem are omitted. -- 2.25.1