Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1599668ybh; Fri, 13 Mar 2020 04:12:28 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtfWT6waZ3IN8WOahWBylUhljbMExCjrW/YNXd0bX4v57ByeZPLehW9lNp+QL3+jkLubU6j X-Received: by 2002:a9d:2215:: with SMTP id o21mr10069324ota.113.1584097948233; Fri, 13 Mar 2020 04:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584097948; cv=none; d=google.com; s=arc-20160816; b=zrngXzcIxoTO4HnJ9hfIICPMUQUFaPZLXuVpWm0/GW9rLRswljUChNqHVrtYo2PH3o mVFUHMDWombRNTEQK7ZO1etVDZCkHxuFIFo1Lu+p8A/zEn57k0IpQPNS5Fwg+DZWp0Qr vWB2v/IVjml3wGUlktkPrL+B0Z5yyKK5ceBNnpr0go/vGnOfsqRsCLofVabvgnC/Tgk1 zjsFS5DFVg1LYklcHZVGRiDSpqM1B1x/zzEXJQEoRw53L04bFVcewJMsX8tfbkq0Pvq5 nZ4mXsq9Jcp+FiE2m03g8v/JiRD7LMJ3+u+lUW4D/8Iz2/6R0aAEfHFxZJQaYbK6bBtv xJyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter; bh=aJUJWo1LZj7GHP6D/xWhGXLmi2ETii+21qgB6BcB77w=; b=SdIfAUaklfJgC6SEVIB9A4BPwW2+yGyOqhiEuTXgWAXuW9Fiq2nuNa0oaIMZ+suaWa /HCVaW5zeBGe//L6+z9JE4rlGt3B3MVCmWUcaL4i2Fg332GmZ46MAjbkeMh3t0kly4AT t+0lzXLtvZLP5phWtFdpuRMk+EGcPP091+HzwT2x8ZGbGg3huk5EX1THhk1bUYx52yV+ qrgQvNxToTjUKdHYTCaA6VOxCCNtiuSezGH61p1X0DW4GD7a/g9Vkiw0AzUQclb3T+Nq f0hyP8sfkc6jWSUePSPLm0LmYMAb5LR8hbzXkZ3Q5ZWWRMGKUqXsBBJk8ptpdE4nnwLV VX8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@desy.de header.s=default header.b=0Lbrmegj; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11si4100540oie.46.2020.03.13.04.12.03; Fri, 13 Mar 2020 04:12:28 -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=@desy.de header.s=default header.b=0Lbrmegj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726365AbgCMLLb (ORCPT + 99 others); Fri, 13 Mar 2020 07:11:31 -0400 Received: from smtp-o-1.desy.de ([131.169.56.154]:50939 "EHLO smtp-o-1.desy.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726554AbgCMLLa (ORCPT ); Fri, 13 Mar 2020 07:11:30 -0400 Received: from smtp-buf-1.desy.de (smtp-buf-1.desy.de [IPv6:2001:638:700:1038::1:a4]) by smtp-o-1.desy.de (Postfix) with ESMTP id 54746E0941 for ; Fri, 13 Mar 2020 12:11:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp-o-1.desy.de 54746E0941 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=desy.de; s=default; t=1584097888; bh=aJUJWo1LZj7GHP6D/xWhGXLmi2ETii+21qgB6BcB77w=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=0LbrmegjIZUc9wbJL1EVJfeKD/Je3xGhTU4Yw86beR8fYeBIgdzAJgCfZWtPN3Nwy v3imQWopj5V8lvfR38IDVybwc3up5iSVeGrB69GEPsGoW4THUvVv8YtMF1WOciLFhE WOsV9m4r5OSTrJHVpUhuEbIC5AjpEMSDCaBRW2f8= Received: from smtp-m-1.desy.de (smtp-m-1.desy.de [131.169.56.129]) by smtp-buf-1.desy.de (Postfix) with ESMTP id 4C20C120258; Fri, 13 Mar 2020 12:11:28 +0100 (CET) X-Virus-Scanned: amavisd-new at desy.de Received: from z-mbx-2.desy.de (z-mbx-2.desy.de [131.169.55.140]) by smtp-intra-1.desy.de (Postfix) with ESMTP id 2115FC00A2; Fri, 13 Mar 2020 12:11:28 +0100 (CET) Date: Fri, 13 Mar 2020 12:11:27 +0100 (CET) From: "Mkrtchyan, Tigran" To: Frank van der Linden Cc: Trond Myklebust , Anna Schumaker , linux-nfs Message-ID: <948465413.4651196.1584097887947.JavaMail.zimbra@desy.de> In-Reply-To: <20200312211555.GA5974@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> <20200312205139.GA32293@dev-dsk-fllinden-2c-c1893d73.us-west-2.amazon.com> <20200312211555.GA5974@dev-dsk-fllinden-2c-c1893d73.us-west-2.amazon.com> Subject: Re: [PATCH 03/13] NFSv4.2: query the server for extended attribute support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mailer: Zimbra 8.8.15_GA_3901 (ZimbraWebClient - FF73 (Linux)/8.8.15_GA_3895) Thread-Topic: NFSv4.2: query the server for extended attribute support Thread-Index: elNPWdFmL5mjBkO5xQsIXKEvMzg9tg== Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hi Frank, I think the way how you have implemented is almost correct. You query server for supported attributes. As result client will get all attributes supported bu the server and if FATTR4_XATTR_SUPPORT is returned, then client adds xattr capability. This the way how I read rfc8276. Do you have a different opinion? Regards, Tigran. ----- Original Message ----- > From: "Frank van der Linden" > To: "Tigran Mkrtchyan" > Cc: "Trond Myklebust" , "Anna Schumaker" , "linux-nfs" > > Sent: Thursday, March 12, 2020 10:15:55 PM > Subject: Re: [PATCH 03/13] NFSv4.2: query the server for extended attribute support > On Thu, Mar 12, 2020 at 08:51:39PM +0000, Frank van der Linden wrote: >> 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. > > ..or, alternatively, only query xattr_support in nfs4_server_capabilities, > and then its actual value, if it exists, in nfs4_fs_info. > > Any opinions on this? > > - Frank