Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp34805imm; Fri, 21 Sep 2018 09:53:01 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdaggvch29VyrO3QgHIJMxYKDpgp23XLx/lOqjKcRaqM1nFy8R3vvN+gyr1ULMO+MsAOW+Pz X-Received: by 2002:a65:608b:: with SMTP id t11-v6mr42917645pgu.259.1537548781304; Fri, 21 Sep 2018 09:53:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537548781; cv=none; d=google.com; s=arc-20160816; b=sO7ma6pqiy8EWJCS7u2VxjGHLyefGQNnsuPtMijszP2ZXazYCr5BuVee90zgen/boE wgG2biKzOJmAnXWCKShHUpkLlQsF+S4OwaM7pkQPOQl9m70LuBdj+Fq1obYQ9iR+j67z Zcuu/e9mIhZ2EUWMdARV8+73ympoaG9khEAi0M+09JpcI8fx4SX3IK0nBItyLJ2FRLkg SXkTFE5xEu1m1aZwludGfB5CwOHdqqVUG/G0+XdtGgbk1nYEcvZI3ceSnZDtaqjkrjgu 3Vh1BfClFHpK0XJDBvF1sNOGlkNM8yYwNzal5yrvNcNwPlg0S5oSTDGcxmgmJNYIIR1z clGg== 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=LpjVYxbe8NOMO+ZC7lKY+vWhw9l9vBDWkStmTnmK+ME=; b=vU1mOo5PRMdhwjmNdB4g6ss5BTtE7jUyW5dcqLMAIzLZgkmlKEc2gYRWD3FOJ+wWoZ CtKFJDtAcioqG5qrAWlhldSdMcuYNfGPnQfCC+/GKy2U10ph2IL/Futjf+VQj1Yrm0QY 0ErfYD5hWNoUga3RpRoELH328HHpu9JdtLYLy+GEP/YeEhgN4117aCkWJRVgLEuDpsDj d5RZUX0llmoIK2iZyub1VzAiBQATa69TyVQgh8rajyVLd76YqjDrVWmRZyI2B0y65pti VNrsvw3sGUdOFzZB+vbXWYrZCxN2YtPOv2K+WEa6rAScPKsSaNuywh7DUk+9lvLaRHvp 2Alw== 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 a61-v6si28307678plc.239.2018.09.21.09.52.45; Fri, 21 Sep 2018 09:53:01 -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 S2390688AbeIUWmW (ORCPT + 99 others); Fri, 21 Sep 2018 18:42:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57124 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390076AbeIUWmW (ORCPT ); Fri, 21 Sep 2018 18:42:22 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C97931E308; Fri, 21 Sep 2018 16:52:38 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-123-84.rdu2.redhat.com [10.10.123.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id 923B887E23; Fri, 21 Sep 2018 16:52:37 +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: <20180921155455.flkf5vdrm3vgn6do@brauner.io> References: <20180921155455.flkf5vdrm3vgn6do@brauner.io> <20180920151214.15484-6-mszeredi@redhat.com> <20180920151214.15484-1-mszeredi@redhat.com> <17157.1537542475@warthog.procyon.org.uk> To: Christian Brauner Cc: dhowells@redhat.com, Miklos Szeredi , Al Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/6] fsmount: do not use legacy MS_ flags MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20310.1537548756.1@warthog.procyon.org.uk> Date: Fri, 21 Sep 2018 17:52:36 +0100 Message-ID: <20311.1537548756@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 21 Sep 2018 16:52:38 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christian Brauner wrote: > So from reading the patch I got the impression that superblock mount > options passed via fsconfig() are passed as strings like "ro" and are > translated into approriate objects (e.g. flags etc.) by the kernel. I'm having second throughts about that - at least for "ro": that one is particularly problematic as it governs how source devices are opened. I'm kind of tempted to pass that as a flag to fsopen(). What I'd like to do in btrfs, ext4, etc. is open blockdevs as I get the parameters that enumerate them - but I have to hold the looked-up paths till the validate/get_tree stage so that I know the final ro/rw state before I can do the opening. > That seems like a future proof mechanism to extend mount options for > userspace without having to worry about exceeding any integer types in the > future. Maybe this would make sense for non-superblock options as well? I > can see that this is less performant that checking flags and string parsing > is a thing that is not particularly nice but it would be one option to solve > the running out of flags problem. Al disliked the idea of setting up a separate context to define the mount options. > > mount_setattr(int dfd, const char *path, unsigned int atflags, > > unsigned int attr_values, > > unsigned int attr_mask); > > If we go with the flag arguments wouldn't it make sense to use a larger > integer type? You can't - at least not directly through syscall args. They are 32-bit on a 32-bit system. > > where atflags can potentially include AT_RECURSIVE. > > Very much in favor of having this operate recursively! It gets complicated with propagation. David