Inverted mount options completely broken (iversion,relatime)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, David Howells <dhowells@xxxxxxxxxx>, Al Viro <viro@xxxxxxxxxxxxxxxxxx>, Eric Sandeen <sandeen@xxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Linux FS Devel <linux-fsdevel@xxxxxxxxxxxxxxx>, David Sterba <dsterba@xxxxxxxx>
- Subject: Inverted mount options completely broken (iversion,relatime)
- From: Josef Bacik <josef@xxxxxxxxxxxxxx>
- Date: Wed, 29 Jul 2020 14:32:30 -0400
- User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.10.0
Hello,
Eric reported a problem to me where we were clearing SB_I_VERSION on remount of
a btrfs file system. After digging through I discovered it's because we expect
the proper flags that we want to be passed in via the mount() syscall, and
because we didn't have "iversion" in our show_options entry the mount binary
(form util-linux) wasn't setting MS_I_VERSION for the remount, and thus the VFS
was clearing SB_I_VERSION from our s_flags.
No big deal, I'll fix show_mount. Except Eric then noticed that mount -o
noiversion didn't do anything, we still get iversion set. That's because btrfs
just defaults to having SB_I_VERSION set. Furthermore -o noiversion doesn't get
sent into mount, it's handled by the mount binary itself, and it does this by
not having MS_I_VERSION set in the mount flags.
This happens as well for -o relatime, it's the default and so if you do mount -o
norelatime it won't do anything, you still get relatime behavior. The only time
this changes is if you do mount -o remount,norelatime.
So my question is, what do we do here? I know Christoph has the strong opinion
that we just don't expose I_VERSION at all, which frankly I'm ok with. However
more what I'm asking is what do we do with these weird inverted flags that we
all just kind of ignore on mount? The current setup is just broken if we want
to allow overriding the defaults at mount time. Are we ok with it just being
broken? Are we ok with things like mount -o noiversion not working because the
file system has decided that I_VERSION (or relatime) is the default, and we're
going to ignore what the user asks for unless we're remounting? Thanks,
Josef
[Index of Archives]
[Linux Ext4 Filesystem]
[Union Filesystem]
[Filesystem Testing]
[Ceph Users]
[Ecryptfs]
[AutoFS]
[Kernel Newbies]
[Share Photos]
[Security]
[Netfilter]
[Bugtraq]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux Cachefs]
[Reiser Filesystem]
[Linux RAID]
[Samba]
[Device Mapper]
[CEPH Development]