Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1199491pxb; Thu, 19 Aug 2021 23:39:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxWqUmcCmZeOqjzZ2m39lwUGMaL+3z3nIw3Re0tPu9wqJO0c5v2cWQSzwppDFLv+gy+HBv X-Received: by 2002:a05:6402:148:: with SMTP id s8mr20761529edu.298.1629441553373; Thu, 19 Aug 2021 23:39:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629441553; cv=none; d=google.com; s=arc-20160816; b=BL3zcOrRBsWEsHfOxd/rAZBJP735CXHTOSFfQNP8UXl/i5BMLCcEH7WURG2XnKRe1Y BpOrS505V85LwCwgzUCnCswO1pUjYkCyvKoh9rkOtmDsUORnR5LeQD4z8vS0FF8ljKug qpQY+vjEfxbnLhsZ1gHSj/dkp0gmUG1CWdkHbk20Y1gwXzPrVVKwvf0vtyFI9pLK1IwN ESG6MDwz2qlatQaN5A1tK81KariavdbNIzK0ZUrl0x0NPDY2XhlUpl0O5+hEhhyBqJKD AqJUi2CVDWeQeDG62Iw5h3Q0Wdom5/eROmKxXidIFxSjrVV6nTyXFBm1Cqk1RG6Puyqu fomQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ZuA3Rp/DCd8wiOoviZGWe2nWNbd+d142wY7eiW3RWo4=; b=z4QNE4Eg6NHuopWJmGF8yWkax3FRyNWt7fi2xPfnYxv4Gkh1APPWHQQEIqEt4IGSi+ NyTa5c+zdTANhEbJgz/H+tey8v/IZIYuXD5XSqTfGfFUiCQOkQJHeYjulrGVikH7mqBi /xhzHWoIjlzaWp/K/YmR7999ihd/QFKoUo9jKRRojbzwR8p9wLY4lkQtxUvKBkBpKpnT Efa3Jx2Si9d2tvg/RNsaM12UggNNCLqbtEZUG928adStn1LC70f8aGqW8sKaRR1rTLCU s3fVmWE6raDO0jSITFDhTOKA7QVsGDs0ltj25A0uCI2s0moz1s9Ygz6sy22PMNHpBNNg iGIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X7tLesja; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j14si6079231edk.558.2021.08.19.23.38.46; Thu, 19 Aug 2021 23:39:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X7tLesja; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238463AbhHTGh1 (ORCPT + 99 others); Fri, 20 Aug 2021 02:37:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238276AbhHTGh0 (ORCPT ); Fri, 20 Aug 2021 02:37:26 -0400 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A47FDC061575; Thu, 19 Aug 2021 23:36:49 -0700 (PDT) Received: by mail-il1-x12f.google.com with SMTP id x5so8497876ill.3; Thu, 19 Aug 2021 23:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZuA3Rp/DCd8wiOoviZGWe2nWNbd+d142wY7eiW3RWo4=; b=X7tLesjaBdIqlT5m/SdKY5cRoTwRmozYq56mkWKscIhet8KJchYwbEX0WNHavI1byr oyAI6DqVm9nuO1DJ2pOwvNG/8NBtro+C5Dv3tjpfxy/hZxunxp5vEefv4hLVXfUezNX8 VepeS6odkBmyIk73Rx1M2vq6ADBtN3CPKLYG9pzl+Trfu4m+2+gejWHy82gl2+7g4lej ulEl7J1WY7Y8AMuMtpb1dI4YsYaKgsqKXrppwZAYfqeG+Ha5kHPX/kptrHQVqUr+3SNv qkui6KuZdzRK+HzKZACmXu62sjRkSm4sQ3YnLEcU3g4WXTtcKIr13/vRxovGzp6Dmvzw 4y1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZuA3Rp/DCd8wiOoviZGWe2nWNbd+d142wY7eiW3RWo4=; b=SMYL7nb6S8ZNBsKU8KQ4/VytnYBTvaJYFwRUXakdT8xJ3RNQCV4HVeoWOfoPsoGqDH 0WYkhk4ZLXpgiLxjsgGxIK2vucjuWMo/denbkbc9UqMYq1pSpN/oY7YgWSOtxfnzOuCt Tyi0zriuzYOmT6D+dyLEJNUBSr30ELC/PHZtBpRqTtjkvgFcaz2lBEDkoIilmHKrSzt6 fC/L11qT9j2WFjnC7ApOVEbcU/5aI9EKyoajv1Ep9UnpSYMohH0wDdnm9JALptXSUY4p +zpnmFGxb2UHsENT/VIPjCkXE2SAC/o8f49V0FaHsqbLAokxe5GhijejnVZzMObyrXe1 omAw== X-Gm-Message-State: AOAM532rpVR0dBYDX+tSOOrAVrLgs6CFtnZIjI76ADZhsbj8Mz1FJ9Qm c8wGgDmDZijm5/qlzx3emorh3eRG095zCuwdnrU= X-Received: by 2002:a92:cd0a:: with SMTP id z10mr12330672iln.137.1629441409010; Thu, 19 Aug 2021 23:36:49 -0700 (PDT) MIME-Version: 1.0 References: <20210812084348.6521-1-david@redhat.com> <87o8a2d0wf.fsf@disp2133> <60db2e61-6b00-44fa-b718-e4361fcc238c@www.fastmail.com> <87lf56bllc.fsf@disp2133> <87eeay8pqx.fsf@disp2133> <5b0d7c1e73ca43ef9ce6665fec6c4d7e@AcuMS.aculab.com> <87h7ft2j68.fsf@disp2133> <87k0kkxbjn.fsf_-_@disp2133> <0c2af732e4e9f74c9d20b09fc4b6cbae40351085.camel@kernel.org> In-Reply-To: From: Amir Goldstein Date: Fri, 20 Aug 2021 09:36:38 +0300 Message-ID: Subject: Re: Removing Mandatory Locks To: Linus Torvalds Cc: Jeff Layton , "Eric W. Biederman" , Matthew Wilcox , Andy Lutomirski , David Laight , David Hildenbrand , Linux Kernel Mailing List , Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Al Viro , Alexey Dobriyan , Steven Rostedt , "Peter Zijlstra (Intel)" , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Petr Mladek , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Kees Cook , Greg Ungerer , Geert Uytterhoeven , Mike Rapoport , Vlastimil Babka , Vincenzo Frascino , Chinwen Chang , Michel Lespinasse , Catalin Marinas , Huang Ying , Jann Horn , Feng Tang , Kevin Brodsky , Michael Ellerman , Shawn Anastasio , Steven Price , Nicholas Piggin , Christian Brauner , Jens Axboe , Gabriel Krisman Bertazi , Peter Xu , Suren Baghdasaryan , Shakeel Butt , Marco Elver , Daniel Jordan , Nicolas Viennot , Thomas Cedeno , Collin Fijalkovich , Michal Hocko , Miklos Szeredi , Chengguang Xu , =?UTF-8?Q?Christian_K=C3=B6nig?= , "linux-unionfs@vger.kernel.org" , Linux API , "the arch/x86 maintainers" , "" , Linux-MM , Florian Weimer , Michael Kerrisk Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 19, 2021 at 11:32 PM Linus Torvalds wrote: > > On Thu, Aug 19, 2021 at 1:18 PM Jeff Layton wrote: > > > > Now that I think about it a little more, I actually did get one > > complaint a few years ago: > > > > Someone had upgraded from an earlier distro that supported the -o mand > > mount option to a later one that had disabled it, and they had an (old) > > fstab entry that specified it. > > Hmm. We might be able to turn the "return -EINVAL" into just a warning. > > 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. > > The logic being that if you can no longer enable mandatory locking in > the kernel, the current hard failure seems overly aggressive (and > might cause boot failures and inability to fix/report things when it > possibly keeps you from using the system at all). > Allow me to play the devil's advocate here - if fstab has '-o mand' we have no way of knowing if any application is relying on '-o mand' and adding more !!!!! to the warning is mostly good for clearing our conscious ;-) Not saying we cannot resort to that and not saying there is an easy solution, but there is one more solution to consider - force rdonly mount. Yes, it could break some systems and possibly fail boot, but then again an ext4 fs can already become rdonly due to errors, so it wouldn't be the first time that sysadmins/users run into this behavior. Thanks, Amir.