Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp32073imm; Fri, 19 Oct 2018 16:51:49 -0700 (PDT) X-Google-Smtp-Source: ACcGV62o47JzlRR9O4ykdNIhFv60yOJggWtgI7/mrPyekzmUP+dh2rRfPiI3FiSeZtzTDnBuPsIp X-Received: by 2002:a63:a612:: with SMTP id t18-v6mr33828539pge.338.1539993109652; Fri, 19 Oct 2018 16:51:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539993109; cv=none; d=google.com; s=arc-20160816; b=mPyJcwMOfyOMtaiSHDUZmeme2kjxhIVf5ZQ1NDsZlWKNYG0N7SkHhOI7G36AK7ftz1 oAZuWjxk/RxTsDON6oAkVhLtMxnTsTXKI34qqNmZC57jn+rUQ2QKsmfl/mRSzxcHXc5P s2/ngF7c46sD4VEiBNyXV2K8KiyOhUzEYeh1AnMDtg5Oc943A5+ymcOlNbYYtQXNYCPP PMH+08RVPVnnYg/oobQ7zN3v9HdH1ZdVO+hUsUO762RY+r2t7FjZPcqRLmecq4hqHJHL ckaOT3jyxYHCRz+LqAgA/A+LOK+9Jg6urXKAEYVXHkQfhDS3Lwduq7E5FS25T1/i4ojO bHkA== 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=yKadX7X6nKu9bjcFazyGtjseFb8q7iuZpGOvy2Yh0yw=; b=DHn7h5y6ggcfA6qhKrFZlC6JB3/7T9SkcnXfWISsUugHta+VWYRuT4kSwBzv5Eeodi 6ZakW9hGOPp8wHzAKXmNCsSAfANMVfjzBL0L1q81ij2IEW5SEuVtIMftTXJYDl3R6fnz OFAwmkuCcCVd6M3ASr4ujwzFvUaEQaYRuNamDtBgNpRu3onGctG+yWHMs7vIzm+A2FyG 0QhvaVIIFoObD7w6a4uE/zAKyCWGt4IlzQxxtz7t5/1bIhwG+RCYmpo03OiC+GgmuaPA EDUbZDBJPkN+hul+Esv7L1A7lJhw5lwRxPJVWHVXFTXd7DjWDVWld5n0eQky5PBmtCzB B5KA== 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 f59-v6si27517991plf.409.2018.10.19.16.51.34; Fri, 19 Oct 2018 16:51:49 -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 S1727078AbeJTH6t (ORCPT + 99 others); Sat, 20 Oct 2018 03:58:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33726 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726601AbeJTH6s (ORCPT ); Sat, 20 Oct 2018 03:58:48 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8C5DC30024D8; Fri, 19 Oct 2018 23:50:35 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-250.rdu2.redhat.com [10.10.120.250]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7DE376F927; Fri, 19 Oct 2018 23:50:33 +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: <20181019143932.6697-1-mszeredi@redhat.com> <18142.1539964788@warthog.procyon.org.uk> To: Miklos Szeredi Cc: dhowells@redhat.com, Miklos Szeredi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Linux API , Michael Kerrisk , Andreas Dilger , Florian Weimer , Amir Goldstein Subject: Re: [PATCH v2 6/5] statx: add STATX_RESULT_MASK flag MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2954.1539993032.1@warthog.procyon.org.uk> Date: Sat, 20 Oct 2018 00:50:32 +0100 Message-ID: <2955.1539993032@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 19 Oct 2018 23:50:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Miklos Szeredi wrote: > This is very much about the basic statx fields. I.e. what does > result_mask == STATX_BASIC_STATS means? > > a) this is a legacy stat() implementation that doesn't fill in the > result_mask properly > > b) this is an up-todate stat() implementation that does fill the > result_mask properly and all fields are valid > > There's no way to tell which one it is, and no way to request that > filesystem try b) even if it's more costly. Okay, I think I see what you're getting at. We need to be able to tell the user that we don't actually know what's good and what's not. I guess this doesn't only apply to fuse, but could also apply to nfs potentially as nfs doesn't necessarily know what the server is capable of and where it's making stuff up (imagine an NFS server backing both an ext4 and a fat filesystem). I would be tempted to represent this with an attribute flag instead, say: STATX_ATTR_UNCERTAIN_VALUES Your attributes are actually in one of at least three states, not two: unsupported, definite and uncertain. Definite things might include such as STATX_TYPE - after all, if you don't know what type a file is, you can't really use it. If someone really needs to know, it might be worth deferring further information to fsinfo(). David