Re: [RFC PATCH] fat: add noflush mount option
From: OGAWA Hirofumi
Date: Wed Aug 26 2026 - 04:57:54 EST
David Timber <dxdt@xxxxxxxxxxxx> writes:
> On 8/26/26 16:21, OGAWA Hirofumi wrote:
>> David Timber <dxdt@xxxxxxxxxxxx> writes:
>>
>>> On 8/25/26 13:31, OGAWA Hirofumi wrote:
>>>> Well, with a your patch, just remounting without "flush" option doesn't
>>>> remove flush?
>>> fat_parse_param() doesn't behave like other fs. The current
>>> implementation only accepts rw and ro for reconfig. So the option cannot
>>> be flipped up and down at will.
>> I meant with your patch. With your patch, it updates flush to current
>> option set, right? And default flush=false, I may missing something
>> though.
> Of course. It shouldn't change the default behaviour. When mounting, if
> "flush" is in the mount options, it must be honored UNLESS "noflush" is
> also specified later in the sequences. If neither "flush" or "noflush"
> is specified, then it's not set at all. Specifying "noflush" only should
> be no-op.
>
> If the patch doesn't behave like that, that'd be my mistake and should
> be fixed.
>
> When doing "mount -o remount,..." the patch changes the existing
> behaviour so that "flush" and "noflush" are now honored. Regardless of
> the previous sbi config, for "-o remount,flush" -> it always sets flush.
> For "-o remount,noflush" -> always clear flush.
>
> Hope that cleared things up.
OK. It is compatible way with current FAT behavior, however, it is not
compatible with other FS behavior. The former behavior may be safer for
current script. However, on the other hand, the latter would introduce
other type of issue.
So, which is better is not easy to decide more or less.
--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>