Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp935035ybh; Thu, 12 Mar 2020 13:52:24 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuzYU4V5GS531cDs3Ftz/WrMc2qaVPokyuC2JcPJpXjqqv3b/mDrnB2ES6gtEKWCYeQlBS5 X-Received: by 2002:a9d:64ca:: with SMTP id n10mr8112452otl.325.1584046344248; Thu, 12 Mar 2020 13:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584046344; cv=none; d=google.com; s=arc-20160816; b=JgyWWd2r36tqLShj3Zs3ei/0tuNEpES4xGNzhxNpMMfOO2Bq2HlZXi47moeLC2yRo7 ytp49FcjvXn5u7r8HnnFIAE1U3zwWQfTeAK7ZALvePkiVTOnmGx3d1jKmBP84igLHqeZ 2DtZQKTD29ILh3OsSf3WAGMU+hq5EdTbzuHAIhnjr2NchmP4aFUNqPBghe07dlr1J6lm 9rFOOSjn3HXOHaW2rZ6IT4c+Hf/TMVIriQDwI3Fi2uhyFw0M85uqRSkDqYtQe7DpTsvL eXccCouvuFMqyvLKb+BgpyxeZJP3eFcmA6W53ahRF+Dsex7nmXP6xpC6Gu3Lf9avBBZN lpPQ== 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:ironport-sdr:dkim-signature; bh=C+p2pNJnFkPfToLtvxUpfsaaGeQeKgcQfW/hF107O5c=; b=dnwimuC8nSrHjQGXEN6tc+7VADRvj0CBFLSdMWfgAYeR8htP0Yfwv5L1K49wwbSPWU QaJmzK6tlIwL/lBk8nDZs2Fc6EChryi+xhCGHPdwzoqDVHy8pp3fZK2G8Icki6seDhA3 3lDs1xQz1L3yZvZR0GOHgXao3hbiFJKVpTS3JvLEiItVVWF9ArZs8wmafAuAbn2heE79 eRqbsxKydQEQQ+7cTRXYn8env9LyDJw4nWA/wBGeWyyW+vl9wTFY0IP0Tmm3/NvG/aRa Q/xWuZ4HOesEOTjapfrGnYDEcMANFLwHHU2yb3LeXo4rn5k8qUMTCESCyFTeyMfjUd7z 9LcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=v9ZUgbnv; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8si3134344oii.249.2020.03.12.13.51.49; Thu, 12 Mar 2020 13:52:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=v9ZUgbnv; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726312AbgCLUvp (ORCPT + 99 others); Thu, 12 Mar 2020 16:51:45 -0400 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]:7810 "EHLO smtp-fw-9101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725268AbgCLUvp (ORCPT ); Thu, 12 Mar 2020 16:51:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1584046305; x=1615582305; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=C+p2pNJnFkPfToLtvxUpfsaaGeQeKgcQfW/hF107O5c=; b=v9ZUgbnvCnv0nu49Yz0gnFoXq0Ez+fTwqXZvST9QwSILQy+c7lUNua0Q CG+elJhSrY8NzpjiITF6pjbHts/AxzDVsIqpFHIj8MWf6K43zMn5FFMlv u/TBJl8yXi1xtzDZVce5cfT7Vk3PBtWFFf2WJXrPWJ8slZ2yXBa1rv+Sz A=; IronPort-SDR: vWJBAWirJ4KF7BjXQAftYG0Hn8i6kWFPUj3NejJiQT+YdHlgTloX3IfvDNfeDWuliQDFrME0Y5 qJCl/wouB/BQ== X-IronPort-AV: E=Sophos;i="5.70,545,1574121600"; d="scan'208";a="22543996" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1e-c7c08562.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP; 12 Mar 2020 20:51:43 +0000 Received: from EX13MTAUEA002.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1e-c7c08562.us-east-1.amazon.com (Postfix) with ESMTPS id 910DD241E9F; Thu, 12 Mar 2020 20:51:40 +0000 (UTC) Received: from EX13D25UEA004.ant.amazon.com (10.43.61.126) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1236.3; Thu, 12 Mar 2020 20:51:40 +0000 Received: from EX13MTAUEA002.ant.amazon.com (10.43.61.77) by EX13D25UEA004.ant.amazon.com (10.43.61.126) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 12 Mar 2020 20:51:39 +0000 Received: from dev-dsk-fllinden-2c-c1893d73.us-west-2.amazon.com (172.23.141.97) by mail-relay.amazon.com (10.43.61.169) with Microsoft SMTP Server id 15.0.1236.3 via Frontend Transport; Thu, 12 Mar 2020 20:51:39 +0000 Received: by dev-dsk-fllinden-2c-c1893d73.us-west-2.amazon.com (Postfix, from userid 6262777) id 4E45BC13B8; Thu, 12 Mar 2020 20:51:39 +0000 (UTC) Date: Thu, 12 Mar 2020 20:51:39 +0000 From: Frank van der Linden To: "Mkrtchyan, Tigran" CC: Trond Myklebust , Anna Schumaker , linux-nfs Subject: Re: [PATCH 03/13] NFSv4.2: query the server for extended attribute support Message-ID: <20200312205139.GA32293@dev-dsk-fllinden-2c-c1893d73.us-west-2.amazon.com> References: <20200311195613.26108-1-fllinden@amazon.com> <20200311195613.26108-4-fllinden@amazon.com> <530167624.4533477.1584029710746.JavaMail.zimbra@desy.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <530167624.4533477.1584029710746.JavaMail.zimbra@desy.de> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, Mar 12, 2020 at 05:15:10PM +0100, Mkrtchyan, Tigran wrote: > > + fattr4_word2_nfs42_mask = FATTR4_WORD2_NFS42_MASK; > > + > > + if (minorversion >= 2) { > > I am not sure you need this extra check as by querying for FATTR4_WORD0_SUPPORTED_ATTRS > server already will return FATTR4_WORD2_XATTR_SUPPORT if supported. There used to be a mount option check here, which I later removed. That means that fattr4_word2_nfs42_mask is no longer needed, so I'll remove that. As for the attribute itself: I suppose the question here is what the client should use to assume the server has RFC 8276 support: 1) The xattr_support attribute exists 2) The xattr support attribute exists *and* it's true for the root fh Currently the code does 2) in one operation. That might not be 100% correct - the RFC does mention that (section 8.2): "Before interrogating this attribute using GETATTR, a client should determine whether it is a supported attribute by interrogating the supported_attrs attribute." That's a "should", not a "MUST", but it's still waving its finger at you not to do this. Since 8.2.1 says: "However, a client may reasonably assume that a server (or file system) that does not support the xattr_support attribute does not provide xattr support, and it acts on that basis." ..I think you're right, and the code should just use the existence of the attribute as a signal that the server knows about xattrs - operations should still error out correctly if it doesn't. I'll make that change, thanks. Frank