Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7807176ybl; Tue, 24 Dec 2019 09:18:48 -0800 (PST) X-Google-Smtp-Source: APXvYqxtDtHBAQfQfNerWvnxp1yUnEfUrtlaOeol7GmfP2qDcWyyXLYz0kNAi86/LFsnFW7WJBcP X-Received: by 2002:a05:6830:451:: with SMTP id d17mr37884624otc.53.1577207927979; Tue, 24 Dec 2019 09:18:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577207927; cv=none; d=google.com; s=arc-20160816; b=noDK/iklreLoNSaAv8sFcuy/mzzQLxpZDcJ51sBK+wtPLchfO3+LZqsKQU7ykpvkWr Bwd2TCNdJhQmISjlnsUuj2gWuO6f6qI4ab75Onf94QU1njHxQyinMqd5knUyR2bMfGP+ TdkJhag5xYe2ki2t2gB17Jq6waV6ECiPDk1efwKZI/2dntdClyhwA8WAX2hwESnCRoX3 Er3ivCNcFfXK8Nhtr0LZSyszTWj3By8NSSqfG0nrkYXR9v5pNGCUXp8jUnqKQSopA9j9 AmzpnuXuB2XWJXyF0VmhM6FqWdEMmk6gr4xS+JTiQ8H3xGri75XQTGwzwkKKmDE/qzxp 0wvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=16x6B6GB01cyFFz/zl1f7nB/S+PReQwL6TLKpsXZYjA=; b=mooF61QPlCgWVtw4Jkxkhjxb99XdGeW/UpEg5HZ18DaXPig1eTsf0Ola6UTUhL5hiv 0XEof9JOEQVtRYlyOkTJhNNCYPXR1e3nw+zc2cQQuWoNwx2B3CjQJWJ1UJ15bSR/+OlI yb33Wzg8DdvYboVcUvg1BuvwCqvimIjrGSjwAJ2P7cB8FNhlfXkSisp45ifOWmqDUJo6 OpxcTgXHBK/xsbkR4S1JJDqDulra1MSSyXeColTRL+KnCMdZ77RwwVyEmWeR3+KJvSiu N6ZvsRjhhwewctnk5sk4CnXc6VEuhRQWlsTfkniGkmAc8jip/maH54DYjSEmMVc7Y2nr fWew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4si12221806otq.144.2019.12.24.09.18.22; Tue, 24 Dec 2019 09:18:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726178AbfLXRSV (ORCPT + 99 others); Tue, 24 Dec 2019 12:18:21 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:47708 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbfLXRSV (ORCPT ); Tue, 24 Dec 2019 12:18:21 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1ijnp4-0004I4-Q7; Tue, 24 Dec 2019 17:18:18 +0000 Date: Tue, 24 Dec 2019 17:18:18 +0000 From: Al Viro To: Lukas Czerner Cc: linux-ext4@vger.kernel.org, Theodore Ts'o , David Howells Subject: Re: [PATCH 02/17] ext4: Add fs parameter description Message-ID: <20191224171818.GO4203@ZenIV.linux.org.uk> References: <20191106101457.11237-1-lczerner@redhat.com> <20191106101457.11237-3-lczerner@redhat.com> <20191217004419.GA6833@ZenIV.linux.org.uk> <20191217121956.amsymslmuoy6kzu4@work> <20191217152012.GY4203@ZenIV.linux.org.uk> <20191217163432.diborehdrfkmfqxp@work> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191217163432.diborehdrfkmfqxp@work> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Dec 17, 2019 at 05:34:32PM +0100, Lukas Czerner wrote: > > If so, I would prefer > > fsparam_flag_no("barrier", Opt_barrier), // barrier | nobarrier > > fsparam_u32("barrier", Opt_barrier), // barrier= > > as the solution, with fs_parse() having been taught to allow argument-bearing > > and argument-less options with the same name, picking the right one. That > > way Opt_nobarrier gets removed as well... > > > > I'll push a branch with that stuff later today; will post when it's out... > > That would be great, thanks. It took longer than I hoped, sorry ;-/ The current patchset is in #untested.fs_parse; the really interesting part is up to "turn fs_param_is_... into functions". One surprising source of PITA around your patchset is ext4_show_options(). It pretty much forces you into keeping "no..." forms separate, even though normally you could just say fsparam_flag_no("quota", Opt_quota), and get rid of Opt_noquota, etc. If you keep that dependency, it'll need to be documented - right in fs/ext4/super.c, to make sure we don't get "optimizing" followups breaking the hell out of things. Said that, I really doubt that token2str() is a good idea. It might make more sense to start with separating _ext4_show_options() from that machinery. Another thing is that all fsparam_bool() users are modifying user-visible ABI; use fparam_flag_no() + fsparam_u32() with the same name and same opt - that'll give you the existing behaviour.