All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: miklos@szeredi.hu, amir73il@gmail.com,
	linux-unionfs@vger.kernel.org, fuweid89@gmail.com
Subject: Re: [PATCH] ovl: Allow changing default fsync_mode
Date: Tue, 23 Jun 2026 21:03:58 +0800	[thread overview]
Message-ID: <7b4443de-e91b-49b4-b27d-8113f0832a8a@linux.alibaba.com> (raw)
In-Reply-To: <CALOAHbAY-3GAd=7DsA74W4ax7aPdXC7ecYt6b+tHoxFu754ZjA@mail.gmail.com>



On 2026/6/23 17:59, Yafang Shao wrote:
> On Tue, Jun 23, 2026 at 5:49 PM Gao Xiang <hsiangkao@linux.alibaba.com> wrote:

...

> 
>>
>>>
>>>>
>>>> The other concern is that since `volatile` omits fsync, so
>>>> it's a posix violation (even that makes sense for container
>>>> writable layers), not sure if we have to use it as the
>>>> system-wide default configuration too.
>>>
>>> We have use cases for setting this as a system-wide configuration. It
>>> is unclear whether others have similar needs.
>>
>> While I cannot speak out of overlayfs, but really it depends
>> on if the use cases is generic.
>>
>> Usually filesystems need to obey posix semantics as much as
>> possible, and using specific mount option to relax (violate)
>> some restriction, but it shouldn't be a system-wide stuff
>> since otherwise user applications cannot know if they really
>> live in the posix world.
> 
> AFAICS, the Linux kernel does not strictly follow POSIX in a number of areas.
> 
> BTW,
> 1. The "volatile" is not the default option.
> 2. Even when the system-wide default is set to "volatile", users can
> still change it per mount.

"
When overlay is mounted with "volatile" option, the directory
"$workdir/work/incompat/volatile" is created.  During next mount,
overlay checks for this directory and refuses to mount if present.
This is a strong indicator that the user should discard upper and
work directories and create fresh ones.
"

When the system-wide default is set to "volatile", it will become
a systemwide maintenance/compatiblity nightmare, at the very least,
if any overlayfs mount that needs to be remountable on these
systems (even something as small as a bash script that mounts an
overlayfs which must be remountable) they have to add "fsync=",
that needs application changes.

In my opinion, the argument "volatile is not the default option"
is not valid, since any reasonably robust userspace application
has to deal with _every visible Kconfig_ that could change the
kernel's default incompatible behavior. Otherwise, users who run
such applications on these kernels will inevitably complain.

On the other hand, I think the kernel itself should also be
responsible for ensuring that a new opt-in default remains
compatible with most existing userspace applications, regardless
of whether it is gated behind a Kconfig.

I don't think exposing incompatible default behavior, even behind
a new Kconfig, is okay without first reaching a sufficiently broad
audience.

Thanks,
Gao Xiang

      parent reply	other threads:[~2026-06-23 13:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-23  8:43 [PATCH] ovl: Allow changing default fsync_mode Yafang Shao
2026-06-23  9:00 ` Gao Xiang
2026-06-23  9:15   ` Yafang Shao
2026-06-23  9:25     ` Gao Xiang
2026-06-23  9:34       ` Yafang Shao
2026-06-23  9:49         ` Gao Xiang
2026-06-23  9:59           ` Yafang Shao
2026-06-23 10:06             ` Gao Xiang
2026-06-23 10:12             ` Gao Xiang
2026-06-23 10:18               ` Yafang Shao
2026-06-23 10:25                 ` Gao Xiang
2026-06-23 11:38                   ` Yafang Shao
2026-06-23 11:59                     ` Gao Xiang
2026-06-23 12:47                       ` Yafang Shao
2026-06-23 13:11                         ` Gao Xiang
2026-06-23 13:19                           ` Yafang Shao
2026-06-23 13:35                             ` Gao Xiang
2026-06-23 13:39                               ` Yafang Shao
2026-06-23 13:42                               ` Christoph Hellwig
2026-06-23 13:46                                 ` Yafang Shao
2026-06-23 13:47                                 ` Gao Xiang
2026-06-23 14:52                                   ` Amir Goldstein
2026-06-23 13:03             ` Gao Xiang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7b4443de-e91b-49b4-b27d-8113f0832a8a@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.com \
    --cc=amir73il@gmail.com \
    --cc=fuweid89@gmail.com \
    --cc=laoar.shao@gmail.com \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.