Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6173608imu; Wed, 30 Jan 2019 10:01:55 -0800 (PST) X-Google-Smtp-Source: ALg8bN65W2z9qb1xHqQG2qCANaZj3U2tpP0IzB5sg3UfjTorTvakDQeAAUPtWTwsUa4wnMwwm3UR X-Received: by 2002:a62:fc52:: with SMTP id e79mr31858934pfh.8.1548871315883; Wed, 30 Jan 2019 10:01:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548871315; cv=none; d=google.com; s=arc-20160816; b=AFCAHJquz5sfTWu5EpHPJ08KGGezU2pQ1t+3p8L3VDuCQeh8j+0EYaQZt5Tc3KyWL2 7H3KBulTgUp9uVOx8iiFG2rpJdUFHEQiWFTAINU66pS6RVVa8oVDc0UhKrqNQspnqxgG taRjGs+6zA9z/RAB5TwfaKC19U0S6ypTwjtCGXEi6uVLUpZQQ8eMhSN7/TOYwvgaYeqK 9uK0ULpmq/T1POCGIWa6muUAEIDgxphpgmwoIYmWFGoQlwiZ5fEKHkc4iHckXvZ1t+kO vRjJJhe1P/SgxAZ6zjvlSmgc6I6O4o3o0GUUGVhb3VEki7jlfNZ/r8PhgCDkTnIpTard XHmA== 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=30ekKvfEZq7PPv+LKyOETeuaXmCwybjkZXS4iwH3ygw=; b=mHlczhO3mrAXhyn6ZVSIP9IZxyWhF+RzTK7rf2L4Xhp4GLBSC3qplvHkWTRtVGZ4BY 8BjIB730bSpOK/HZqE0TFoTiMJrOvVdJ3Jj2Ehfner+NhuMgWogXrw7Q/wI+Hie4fJ80 HgJer/VI1XOdeGSUHVt/GA3nh70N2DI/NVBHMO5yjXpvc5VWH9wZHIxqvyNOOHwmyqcA 0pFO5kkCgXR6C12c/wgrjUT5oCdz7/4sJKf4up44bjP4SBPG8OEYCXxPe/wXee9h/+z9 ZeqSmEtcMWHVBIrMNDb4848BVuWnywBrVOI4GvQabynfe/0ChUHxEce6hcT0IAZeTYD5 cPhg== 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 n30si1887759pgb.406.2019.01.30.10.01.39; Wed, 30 Jan 2019 10:01:55 -0800 (PST) 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 S1727209AbfA3SA6 (ORCPT + 99 others); Wed, 30 Jan 2019 13:00:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60282 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbfA3SA6 (ORCPT ); Wed, 30 Jan 2019 13:00:58 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D781C062EA1; Wed, 30 Jan 2019 18:00:58 +0000 (UTC) Received: from ws.net.home (ovpn-117-196.ams2.redhat.com [10.36.117.196]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C914B26387; Wed, 30 Jan 2019 18:00:53 +0000 (UTC) Date: Wed, 30 Jan 2019 19:00:51 +0100 From: Karel Zak To: "Eric W. Biederman" Cc: David Howells , linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Al Viro , Miklos Szeredi , Linus Torvalds , util-linux@vger.kernel.org, Andy Lutomirski Subject: Re: [RFD] A mount api that notices previous mounts Message-ID: <20190130180051.caonbh2t7wtsdqo5@ws.net.home> References: <20190130120654.q5zqcexquca7u337@ws.net.home> <87va2716mh.fsf@xmission.com> <9871.1548853314@warthog.procyon.org.uk> <87h8dqs1xw.fsf@xmission.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87h8dqs1xw.fsf@xmission.com> User-Agent: NeoMutt/20180716-1023-ca4e12 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 30 Jan 2019 18:00:58 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 30, 2019 at 07:35:39AM -0600, Eric W. Biederman wrote: > I suspect that as long as userspace supports /etc/fstab and we in turn > support /proc/mounts there is going to be a lot of pressure to keep > the majority of options so they can be encoded in a string separated by > commas. Well, we're doing many crazy things in userspace ;-) For example we do not distinguish between VFS flags (MS_*), FS specific mount options and userspace mount options (loop=) in our config files. You already need to parse fstab/command line before you can use the strings for mount(2) syscall. It's already not straightforward, see all the code in libmount... /proc/mounts is only for backward compatibility, /proc/self/mountinfo is better way, because it allows to see VFS and FS, etc. IMHO it would be better to not care about way how we use mount options strings now (in userspace) when you think about the new API design. Karel -- Karel Zak http://karelzak.blogspot.com