From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: dsterba@suse.cz, "Janos Toth F." <toth.f.janos@gmail.com>,
Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: lazytime mount option—no support in Btrfs
Date: Wed, 22 Aug 2018 09:56:59 -0400 [thread overview]
Message-ID: <742cf725-e691-530a-d8a8-ea45b08d0450@gmail.com> (raw)
In-Reply-To: <20180822134851.GH24025@twin.jikos.cz>
On 2018-08-22 09:48, David Sterba wrote:
> On Tue, Aug 21, 2018 at 01:01:00PM -0400, Austin S. Hemmelgarn wrote:
>> On 2018-08-21 12:05, David Sterba wrote:
>>> On Tue, Aug 21, 2018 at 10:10:04AM -0400, Austin S. Hemmelgarn wrote:
>>>> On 2018-08-21 09:32, Janos Toth F. wrote:
>>>>>>>> so pretty much everyone who wants to avoid the overhead from them can just
>>>>>>>> use the `noatime` mount option.
>>>>>
>>>>> It would be great if someone finally fixed this old bug then:
>>>>> https://bugzilla.kernel.org/show_bug.cgi?id=61601
>>>>> Until then, it seems practically impossible to use both noatime (this
>>>>> can't be added as rootflag in the command line and won't apply if the
>>>>> kernel already mounted the root as RW) and space-cache-v2 (has to be
>>>>> added as a rootflag along with RW to take effect) for the root
>>>>> filesystem (at least without an init*fs, which I never use, so can't
>>>>> tell).
>>>>>
>>>> Last I knew, it was fixed. Of course, it's been quite a while since I
>>>> last tried this, as I run locally patched kernels that have `noatime` as
>>>> the default instead of `relatime`.
>>>
>>> I'm using VMs without initrd, tested the rootflags=noatime and it still
>>> fails, the same way as in the bugreport.
>>>
>>> As the 'noatime' mount option is part of the mount(2) API (passed as a
>>> bit via mountflags), the remaining option in the filesystem is to
>>> whitelist the generic options and ignore them. But this brings some
>>> layering violation question.
>>>
>>> On the other hand, this would be come confusing as the user expectation
>>> is to see the effects of 'noatime'.
>>>
>> Ideally there would be a way to get this to actually work properly. I
>> think ext4 at least doesn't panic, though I'm not sure if it actually
>> works correctly.
>
> No, ext4 also refuses to mount, the panic happens in VFS that tries
> either the rootfstype= or all available filesystems.
>
> [ 3.763602] EXT4-fs (sda): Unrecognized mount option "noatime" or missing value
>
> [ 3.761315] BTRFS info (device sda): unrecognized mount option 'noatime'
>
>> Otherwise, the only option for people who want it set is to patch the
>> kernel to get noatime as the default (instead of relatime). I would
>> look at pushing such a patch upstream myself actually, if it weren't for
>> the fact that I'm fairly certain that it would be immediately NACK'ed by
>> at least Linus, and probably a couple of other people too.
>
> An acceptable solution could be to parse the rootflags and translate
> them to the MNT_* values, ie. what the commandline tool mount does
> before it calls the mount syscall.
>
That would be helpful, but at that point you might as well update the
CLI mount tool to just pass all the named options to the kernel and have
it do the parsing (I mean, keep the old interface too obviously, but
provide a new one and use that preferentially).
I also like Duncan's suggestion to expose the default value for the
atime options as a kconfig option (Chris Murphy emailed me directly
about essentially the same thing).
next prev parent reply other threads:[~2018-08-22 17:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-13 11:50 lazytime mount option—no support in Btrfs Adam Hunt
2017-08-14 13:19 ` Austin S. Hemmelgarn
2018-08-18 20:45 ` waxhead
2018-08-19 8:37 ` Martin Steigerwald
2018-08-19 10:25 ` Andrei Borzenkov
2018-08-20 12:16 ` Austin S. Hemmelgarn
2018-08-21 12:06 ` Adam Borowski
2018-08-21 12:17 ` Austin S. Hemmelgarn
2018-08-21 13:32 ` Janos Toth F.
2018-08-21 14:10 ` Austin S. Hemmelgarn
2018-08-21 16:05 ` David Sterba
2018-08-21 17:01 ` Austin S. Hemmelgarn
2018-08-22 3:57 ` Duncan
2018-08-22 11:30 ` Austin S. Hemmelgarn
2018-08-23 4:46 ` Duncan
2018-08-22 13:48 ` David Sterba
2018-08-22 13:56 ` Austin S. Hemmelgarn [this message]
2018-08-22 15:01 ` David Sterba
2018-08-22 16:59 ` Austin S. Hemmelgarn
2018-08-23 23:33 ` Janos Toth F.
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=742cf725-e691-530a-d8a8-ea45b08d0450@gmail.com \
--to=ahferroin7@gmail.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=toth.f.janos@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).