From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F933C43603 for ; Tue, 17 Dec 2019 17:46:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE360206D8 for ; Tue, 17 Dec 2019 17:46:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726967AbfLQRq5 (ORCPT ); Tue, 17 Dec 2019 12:46:57 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:48172 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726874AbfLQRq5 (ORCPT ); Tue, 17 Dec 2019 12:46:57 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihGvs-0001VN-Ue; Tue, 17 Dec 2019 17:46:53 +0000 Date: Tue, 17 Dec 2019 17:46:52 +0000 From: Al Viro To: Miklos Szeredi Cc: Laura Abbott , Linus Torvalds , Ilya Dryomov , David Howells , Jeremi Piotrowski , Linux FS Devel , Phillip Lougher , LKML Subject: Re: [PATCH] vfs: Don't reject unknown parameters Message-ID: <20191217174652.GB4203@ZenIV.linux.org.uk> References: <20191212145042.12694-1-labbott@redhat.com> <20191212213609.GK4203@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, Dec 13, 2019 at 10:15:03AM +0100, Miklos Szeredi wrote: > Just need a flag in fc indicating if this option comes from the old interface: > > if (strcmp(param->key, "source") == 0) > return -ENOPARAM; > /* Just log an error for backwards compatibility */ > errorf(fc, "%s: Unknown parameter '%s'", fc->fs_type->name, > param->key); > return fc->legacy ? 0 : -ENOPARAM; What the hell for? Just have a separate ->parse_param() instance for "promiscuous fs, will accept bullshit options" and have such filesystems use it explicitly. With default being not that, but rejecting unknowns.