Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5903241imu; Wed, 30 Jan 2019 05:38:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN6T5mS7w0/mfYsUpOl9n7CHztb3FRflFKCbu7o7i7yd2Eb/SNUPwBtcaQyosfUaWkmINGaf X-Received: by 2002:a63:fb15:: with SMTP id o21mr27598174pgh.211.1548855492314; Wed, 30 Jan 2019 05:38:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548855492; cv=none; d=google.com; s=arc-20160816; b=czvJYlbKdWYlXqMw3ftYA7wfMV9fFLiJ8lp1KxJxz/OsX8kDYe8C9vAn7K60H1Ia1D zabkTszk4bfi8BQAOSMWwILnWqvLkDB9ow6OPBd/bFX09J699EIfCSBioBfEyDPFsyhA QLHw+J4N38cZ4YjKGtWdfX2zjAQ6sOCmjOPzUzdAyaz3dgFcLCNDerMa1g9BopSB8NH4 vLI8wMJ+coa/gGDgIwQ/PlUyo8JU3oZs35a/uuA2HzdER+glozuioggY5qUae6t3qvjY skGtltRg8KMNJRoCLb/iotKMl+xAv57YnwLRGPoSLVwnDhG47RfRQXIMWiKkeIgw3je5 +EOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:mime-version:user-agent :message-id:in-reply-to:date:references:cc:to:from; bh=WSLNmWs0tV/e0GPkGSrslyQ/2NtFLTsfk/R5woF5UEk=; b=CMMnEJzh4pP5bd4CiB3NL7y9X9J7GEva64KU/rdSa9wt99sZl3D3Z0aRY1gmITawj9 JQ2FSvdCeF/kU0n5rE+tGJZputr6LKkAjukGc4+dQtY4cIPfEoYIsg2J22psHUBAAwB/ 9ZBk1f0aQfay4SH9KOwERQCYtquu4txHYr/wOkeMUNinoH9zcocTd/KQLqTeQa46+eym uh+4c4HoFqeJnetb7jz8g0ua+T/4vxAlVTrGU3poLAVuFPgFZkWQV93ucAXfanW4CCVJ riUBj0F4tQpodWjWxfvKBwdZgHPzc4GN7XrnlwsUU6/q0YVXi3C4cgiossH1orT071Mu SuEw== 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=xmission.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b8si1529073ple.185.2019.01.30.05.37.55; Wed, 30 Jan 2019 05:38:12 -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=xmission.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731180AbfA3Nf6 (ORCPT + 99 others); Wed, 30 Jan 2019 08:35:58 -0500 Received: from out02.mta.xmission.com ([166.70.13.232]:49831 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725851AbfA3Nf5 (ORCPT ); Wed, 30 Jan 2019 08:35:57 -0500 Received: from in01.mta.xmission.com ([166.70.13.51]) by out02.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1goq1s-0006Pg-J5; Wed, 30 Jan 2019 06:35:50 -0700 Received: from ip68-227-174-240.om.om.cox.net ([68.227.174.240] helo=x220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1goq1r-0002aq-QB; Wed, 30 Jan 2019 06:35:48 -0700 From: ebiederm@xmission.com (Eric W. Biederman) To: David Howells Cc: Karel Zak , 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 References: <20190130120654.q5zqcexquca7u337@ws.net.home> <87va2716mh.fsf@xmission.com> <9871.1548853314@warthog.procyon.org.uk> Date: Wed, 30 Jan 2019 07:35:39 -0600 In-Reply-To: <9871.1548853314@warthog.procyon.org.uk> (David Howells's message of "Wed, 30 Jan 2019 13:01:54 +0000") Message-ID: <87h8dqs1xw.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1goq1r-0002aq-QB;;;mid=<87h8dqs1xw.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=68.227.174.240;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+ZJOQetI7Lkgvv6GnlYVYn14lB/eHgqEQ= X-SA-Exim-Connect-IP: 68.227.174.240 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa04.xmission.com X-Spam-Level: X-Spam-Status: No, score=-0.2 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,T_TM2_M_HEADER_IN_MSG autolearn=disabled version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa04 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa04 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;David Howells X-Spam-Relay-Country: X-Spam-Timing: total 326 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 3.8 (1.2%), b_tie_ro: 2.6 (0.8%), parse: 1.38 (0.4%), extract_message_metadata: 5 (1.6%), get_uri_detail_list: 2.3 (0.7%), tests_pri_-1000: 6 (2.0%), tests_pri_-950: 1.93 (0.6%), tests_pri_-900: 1.62 (0.5%), tests_pri_-90: 30 (9.3%), check_bayes: 28 (8.7%), b_tokenize: 9 (2.9%), b_tok_get_all: 7 (2.2%), b_comp_prob: 3.2 (1.0%), b_tok_touch_all: 5.0 (1.5%), b_finish: 2.0 (0.6%), tests_pri_0: 241 (74.1%), check_dkim_signature: 0.61 (0.2%), check_dkim_adsp: 2.8 (0.8%), poll_dns_idle: 0.84 (0.3%), tests_pri_10: 4.7 (1.5%), tests_pri_500: 16 (4.9%), rewrite_mail: 0.00 (0.0%) Subject: Re: [RFD] A mount api that notices previous mounts X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org David Howells writes: > Karel Zak wrote: > >> It seems more elegant is to ask for Nth option as expected by fsinfo(). > > More elegant yes, but there's an issue with atomiticity[*]. I'm in the > process of switching to something that returns you a single buffer with all > the options in, but each key and each value is preceded by a length count. > > The reasons for not using separator characters are: > > (1) There's no separator char that cannot validly occur within an option[**]. *Blink* I had missed the cifs issue. So yes we certainly need a better way to encode things in the buffer. I just used a single string as an easy way to place everything in a buffer. > (2) Makes it possible to return binary values if we need to. I don't totally disagree with this. But I will point out that except for coda passing a file descriptor there are no filesystems that currently take or need binary options. 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. > David > > [*] Atomic with respect to remount calls, that is. There are also mount options that depend on each other and whose order matters with respect to other mount options extN's ("sb=") for example. > [**] Oh, and look at cifs where you can *change* the separator char during > option parsing ("sep=").