Re: Removing Mandatory Locks
flat view
From: Matthew Wilcox <willy@infradead.org>
Date: 2021-08-20 02:14:10
Also in:
linux-fsdevel, linux-mm, linux-unionfs, lkml
On Thu, Aug 19, 2021 at 01:31:35PM -0700, Linus Torvalds wrote:
Yes, yes, currently if you turn off CONFIG_MANDATORY_FILE_LOCKING, we
already do that
VFS: "mand" mount option not supported
warning print, but then we fail the mount.
If CONFIG_MANDATORY_FILE_LOCKING goes away entirely, it might make
sense to turn that warning into something bigger, but then let the
mount continue - since now that "mand" flag would be purely a legacy
thing.
And yes, if we do that, we'd want the warning to be a big ugly thing,
just to make people very aware of it happening. Right now it's a
one-liner that is easy to miss, and the "oh, the mount failed" is the
thing that hopefully informs people about the fact that they need to
enable CONFIG_MANDATORY_FILE_LOCKING.
When I ripped out the NFS "intr" mount option fourteen years ago,
I just turned it into a noop (commit 150030b78a45). It has greatly
amused me every article I've read that's been written since then
that recommends using it. Just shows how much tribal knowledge we
have.
I think this is a little different, though; I was essetially making the
*wanted* behaviour of 'intr' the default (and disabling the unwanted
behaviour). With 'mand', we're losing the behaviour entirely, and it's
plausible that someone might care. Maybe something more like the old
sys_bdflush implementation?
if (msg_count < 5) {
msg_count++;
printk(KERN_INFO
"warning: process `%s' used the obsolete bdflush"
" system call\n", current->comm);
printk(KERN_INFO "Fix your initscripts?\n");
}