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 3BECAC43603 for ; Wed, 18 Dec 2019 03:36:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 18495206EE for ; Wed, 18 Dec 2019 03:36:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726510AbfLRDgI (ORCPT ); Tue, 17 Dec 2019 22:36:08 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:55176 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726492AbfLRDgI (ORCPT ); Tue, 17 Dec 2019 22:36:08 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihQ86-0001fo-Jn; Wed, 18 Dec 2019 03:36:06 +0000 Date: Wed, 18 Dec 2019 03:36:06 +0000 From: Al Viro To: Eric Sandeen Cc: fsdevel , David Howells Subject: Re: [PATCH V2] fs_parser: remove fs_parameter_description name field Message-ID: <20191218033606.GF4203@ZenIV.linux.org.uk> References: <22be7526-d9da-5309-22a8-3405ed1c0842@sandeen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22be7526-d9da-5309-22a8-3405ed1c0842@sandeen.net> 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 06, 2019 at 10:31:57AM -0600, Eric Sandeen wrote: > There doesn't seem to be a strong reason to have a copy of the > filesystem name string in the fs_parameter_description structure; > it's easy enough to get the name from the fs_type, and using it > instead ensures consistency across messages (for example, > vfs_parse_fs_param() already uses fc->fs_type->name for the error > messages, because it doesn't have the fs_parameter_description). Arrgh... That used to be fine. Now we have this: static int rbd_parse_param(struct fs_parameter *param, struct rbd_parse_opts_ctx *pctx) { struct rbd_options *opt = pctx->opts; struct fs_parse_result result; int token, ret; ret = ceph_parse_param(param, pctx->copts, NULL); if (ret != -ENOPARAM) return ret; token = fs_parse(NULL, rbd_parameters, param, &result); ^^^^ Cthulhu damn it... And yes, that crap used to work. Frankly, I'm tempted to allocate fs_context in there (in rbd_parse_options(), or in rbd_add_parse_args()) - we've other oddities due to that... Alternatively, we could provide __fs_parse() that would take name as a separate argument and accepted NULL fc, with fs_parse() being a wrapper for that. *grumble*