[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200806055232.GN7657@mit.edu>
Date: Thu, 6 Aug 2020 01:52:32 -0400
From: tytso@....edu
To: Lukas Czerner <lczerner@...hat.com>
Cc: linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext4: handle option set by mount flags correctly
On Thu, Jul 23, 2020 at 05:05:26PM +0200, Lukas Czerner wrote:
> Currently there is a problem with mount options that can be both set by
> vfs using mount flags or by a string parsing in ext4.
>
> i_version/iversion options gets lost after remount, for example
>
> $ mount -o i_version /dev/pmem0 /mnt
> $ grep pmem0 /proc/self/mountinfo | grep i_version
> 310 95 259:0 / /mnt rw,relatime shared:163 - ext4 /dev/pmem0 rw,seclabel,i_version
> $ mount -o remount,ro /mnt
> $ grep pmem0 /proc/self/mountinfo | grep i_version
>
> nolazytime gets ignored by ext4 on remount, for example
>
> $ mount -o lazytime /dev/pmem0 /mnt
> $ grep pmem0 /proc/self/mountinfo | grep lazytime
> 310 95 259:0 / /mnt rw,relatime shared:163 - ext4 /dev/pmem0 rw,lazytime,seclabel
> $ mount -o remount,nolazytime /mnt
> $ grep pmem0 /proc/self/mountinfo | grep lazytime
> 310 95 259:0 / /mnt rw,relatime shared:163 - ext4 /dev/pmem0 rw,lazytime,seclabel
>
> Fix it by applying the SB_LAZYTIME and SB_I_VERSION flags from *flags to
> s_flags before we parse the option and use the resulting state of the
> same flags in *flags at the end of successful remount.
>
> Signed-off-by: Lukas Czerner <lczerner@...hat.com>
Thanks, applied.
- Ted
Powered by blists - more mailing lists