[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150819082144.GB1689@ws.net.home>
Date: Wed, 19 Aug 2015 10:21:44 +0200
From: Karel Zak <kzak@...hat.com>
To: linux-ext4@...r.kernel.org
Cc: "Theodore Ts'o" <tytso@....edu>
Subject: nolazytime remount
We had issue with "lazytime" remount two mouths ago. This is already
fixed by Ted's patch a2fd66d06. So, now you can enable lazytime by
remount with MS_LAZYTIME flag, but how I can disable lazytime?
enable lazytime (works as expected):
# findmnt /mnt/test
TARGET SOURCE FSTYPE OPTIONS
/mnt/test /dev/sdc1 ext4 rw,relatime,stripe=32,data=ordered
# mount -o remount,lazytime /mnt/test
# findmnt /mnt/test
TARGET SOURCE FSTYPE OPTIONS
/mnt/test /dev/sdc1 ext4 rw,relatime,lazytime,stripe=32,data=ordered
disable lazytime by "nolazytime":
# mount -o remount,nolazytime /mnt/test
# findmnt /mnt/test
TARGET SOURCE FSTYPE OPTIONS
/mnt/test /dev/sdc1 ext4 rw,relatime,lazytime,stripe=32,data=ordered
^^^^^^^^
In this case mount(8) command generates:
mount("/dev/sdc1", "/mnt/test", 0x562ed2f7e210, MS_REMOUNT|MS_RELATIME, "stripe=32,data=ordered") = 0
syscall.
It seems that ext4_remount() allows to enable the option by MS_LAZYTIME,
but there is no sb->s_flags &= ~MS_LAZYTIME at all. It seems like a
regression, because old string based solution (handle_mount_opt()) contains:
case Opt_nolazytime:
sb->s_flags &= ~MS_LAZYTIME;
return 1;
>From my point of view, a2fd66d06 commit is insufficient, for ext4_remount()
we also need "else" for MS_LAZYTIME:
if (*flags & MS_LAZYTIME)
sb->s_flags |= MS_LAZYTIME;
else
sb->s_flags &= ~MS_LAZYTIME;
The another possibility is that "lazytime" is possible enable only --
if yes, then handle_mount_opt() should be fixed to not provide
Opt_nolazytime.
Ted?
Karel
--
Karel Zak <kzak@...hat.com>
http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists