Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4295693ybi; Tue, 18 Jun 2019 15:35:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwzps5nP9Oc/u87p1jD1NKW1ssu10HGlS8J9LxYsU/WummSWNu4GJFBlCK6OVPP2VgqEIm6 X-Received: by 2002:a63:6445:: with SMTP id y66mr4865764pgb.23.1560897314615; Tue, 18 Jun 2019 15:35:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560897314; cv=none; d=google.com; s=arc-20160816; b=ntQ/TqS5TtaZB9Idv78X0m+pbO98153hCx6cMNLWPg1ebEys8IPvnQTL5y81+DHtkA bMr6bdxIIwCNDAKHtCvMwknGKD5C/iYZ44fUutZxUaohy7mSiQWXI8Bn0CeYq2XSajE9 wPcgilr6GHkQAHA5m8gZw06an/HCw5mHI6QeFNbnFEqs3Xi/UOnRnPoiCI8CK5MV29+5 +0KYPyqtFZCyQNZz0JrG4wXvLRo0uZDjjg798uT3ng+7s2yz1FJWeH1bUYuAibkWGt6n 5bWdgKQMD5JsYvgCixhcvctElzp+qdkCsMqUTglWJ7EdOYC4ouOaIGKqQ1uKVB7F2654 E2pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization; bh=PJk6L+F8UtkE0bkE50URUB+tHQUD3EI8+vF9L6EZaIM=; b=zuCHrGEKtvNi6+L1dSQF3VKNZjddU64u70lp1MTMCHsNTcqjIUv1b1cCKRj2KdPown vlf+ES0/hkOXY2ZrGaEvQKIKaJc41XM1VjwG2h01ErRzIJ/EW5sUjOch13BA/U0ja0KX XCyX/RaYl/ydrlQeMnwiqPZbAITlYWtuE+opm2oOL4W6K7wnQhgLXLbySWsXiFYwrBnh NnCGPUd4pXCX8XQnFiglkU7I8Bf/sljl2o+S1LIMEEdPS9yFLogN8VT0hggaLY6WG27v oADFIlzDfDwhsv5kPEdd4CoFR1DYmEXqSkeSjsQFQaQ9Amis93UHhD4XDN1Kw3KYng3i Sm7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v33si1381254pgk.152.2019.06.18.15.34.58; Tue, 18 Jun 2019 15:35:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730575AbfFRWey (ORCPT + 99 others); Tue, 18 Jun 2019 18:34:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56122 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729982AbfFRWey (ORCPT ); Tue, 18 Jun 2019 18:34:54 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2FE433092674; Tue, 18 Jun 2019 22:34:54 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-57.rdu2.redhat.com [10.10.120.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id 68C6C100996F; Tue, 18 Jun 2019 22:34:50 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <155905626142.1662.18430571708534506785.stgit@warthog.procyon.org.uk> <155905629702.1662.7233272785972036117.stgit@warthog.procyon.org.uk> To: Miklos Szeredi Cc: dhowells@redhat.com, Al Viro , Ian Kent , Linux API , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Miklos Szeredi Subject: Re: [PATCH 04/25] vfs: Implement parameter value retrieval with fsinfo() [ver #13] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24126.1560897289.1@warthog.procyon.org.uk> Date: Tue, 18 Jun 2019 23:34:49 +0100 Message-ID: <24127.1560897289@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 18 Jun 2019 22:34:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Miklos Szeredi wrote: > Again, don't blindly transform s_flags into options, because some of > them may have been internally manipulated by the filesystem. In what filesystems do I need to undo this manipulation? > You could do a helper for filesystems that does the the common ones > (ro/sync/dirsync) but all of that *should* go through the filesystem. I don't agree, but since you keep insisting, I've changed the helper function that renders these so that it now takes s_flags as an argument and is called from generic_fsinfo() if the filesystem doesn't handle FSINFO_ATTR_PARAMETERS. Therefore, every filesystem that handles FSINFO_ATTR_PARAMETERS, *must* call the function itself (or do the noting directly) otherwise these parameters will not get rendered. The helper function has been exported, and the calling filesystem can give any s_flags it likes. All the filesystems so far just use path->dentry->d_sb->s_flags. > Same goes for vfs_parse_sb_flag() btw. It should be moved into each > filesystem's ->parse_param() and not be a mandatory thing. I disagree. Every filesystem *must* be able to accept these standard flags, even if it then ignores them. David