Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp899646ybh; Thu, 12 Mar 2020 13:10:46 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs/4QgbhnARb+ohhomRYIXDdzPjlhk7htBY9ia2btYvl4sabmN/nYOPC8HWYaaxLFe1GqTc X-Received: by 2002:a54:4890:: with SMTP id r16mr4167026oic.121.1584043845899; Thu, 12 Mar 2020 13:10:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584043845; cv=none; d=google.com; s=arc-20160816; b=QhP8VyCNCn4j8WZlWMRaP2DV36i+l3HFRVP5wW9WnrZm5BTPZ4FY7uXh+LgURjpcNy wl4uextwzSVBjO4LxwKYKNsPCvlFD0yaEoBMzHqFLlk+U2lcnG2TADNjgoNqwSXcHVw3 6O1XdbRecXiuU7h4V9zzncscEVBpXY4AMRHdMYnggkmxznvbaofpR5i3FlmSlo43rG7R NlyRwGTtefQ627uSVfOkeUFlisuD0saKOSRBmvz85Lt79zUomLfkeluHkDorgQ2SkGYt oLHVPaZ3z2eoMnBmPsG/QgIx6rm+r6FuWV0dU1BeR5cCaZ0jycu9UAiSGo8C06omPqAq Zm4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=VoEV9KU4GDwxNzE6DaMukdb0OGqUdZoDKsktfpqE534=; b=dyyC+2lbrdaHDz7d+7K/t9YIhSAnDL+vJQnJA76olPnveYh16++cb/5Bud+suVDWcd Y1IryB0T5JClkqJEVT2bgMGBT5XyzQGgAdY3QgY4Dk4Dg5gzJ3/w2TO61w3NwatOFzIT qP7qqV8FLEPH65o2QP/MUDkFRAgGex506ho4X/r3qd8rBHjb7kxYes1lur5bjN4LSh45 U2B3H5+Cb5Ukx+zozBNvZnTnGT5rjQ9d068BKlreyRoxi0N+pVv+rQufkBjBFClM5aFw 3ukKKVPBEooDbiYOsStlZt118c+IPmeslmXcL1wf9zmAUsms6akfmCrVcgLh9s2VyVt+ lzxg== ARC-Authentication-Results: i=1; mx.google.com; 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 h203si3225155oif.3.2020.03.12.13.10.19; Thu, 12 Mar 2020 13:10:45 -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; 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 S1726952AbgCLUKJ (ORCPT + 99 others); Thu, 12 Mar 2020 16:10:09 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:38821 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726594AbgCLUKJ (ORCPT ); Thu, 12 Mar 2020 16:10:09 -0400 Received: by mail-ed1-f65.google.com with SMTP id h5so9107600edn.5 for ; Thu, 12 Mar 2020 13:10:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VoEV9KU4GDwxNzE6DaMukdb0OGqUdZoDKsktfpqE534=; b=P4SGh1yBjpoIyaFig/VWclVnLLn6ZkwowllSCgV7rk9FAJZAK5z1ajBsLJNHy7iSWk Xu35oa5q59S0roTbdq45HMm8IhZ6iQ4Tqw9bFb7Z+EWVAOgqD13Z+QAiK/bBfpdbGZoh y5/D9VXvcSeM17hJ5vFzkjwY9+ffcxv6jfskpHVZ1KC//T4pvstueBdliuH39gECL0e3 IuD+jCJWgsInT3j3ukS8xvjiDCpqjJkzR4YG1b3mC9itkOH09XCDBgWl5sy/WUkMiR9J 0Ibvv6bKfO3RyQT5yTcla8Aq8Tg6y+3+85Qj8Gp3v7UGcFD2MHe6yDE8lrSycujUnMs5 MNYw== X-Gm-Message-State: ANhLgQ2DiPRI/GXyVOI0QKVTagVJA1cvf/aJJgrVsWXyvAoJHrfnSXGw nMIUb89NoKp7kp1OWQJISAzrLe1eFij6g43htrE= X-Received: by 2002:a05:6402:161a:: with SMTP id f26mr9300772edv.264.1584043807883; Thu, 12 Mar 2020 13:10:07 -0700 (PDT) MIME-Version: 1.0 References: <20200311195613.26108-1-fllinden@amazon.com> In-Reply-To: <20200311195613.26108-1-fllinden@amazon.com> From: Anna Schumaker Date: Thu, 12 Mar 2020 16:09:51 -0400 Message-ID: Subject: Re: [PATCH 00/13] client side user xattr (RFC8276) support To: Frank van der Linden Cc: trond.myklebust@hammerspace.com, Linux NFS Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hi Frank, On Wed, Mar 11, 2020 at 3:57 PM Frank van der Linden wrote: > > This patchset implements the client side for NFS user extended attributes, > as defined in RFC8726. > > This was originally posted as an RFC in: > > https://patchwork.kernel.org/cover/11143565/ > > Patch 1 is shared with the server side patch, posted > separately. > > Most comments in there still apply, except that: > > 1. Client side caching is now included in this patch set. > 2. As per the discussion, user extended attributes are enabled if > the client and server support them (e.g. they support 4.2 and > advertise the user extended attribute FATTR). There are no longer > options to switch them off on either the client or the server. > 3. The code is no longer conditioned on a config option. > 4. The number of patches has been reduced somewhat by merging > smaller, related ones. > > The client side caching is implemented through a per-inode hash table, > which is allocated on demand. See fs/nfs/nfs42xattr.c for details. > > This has been tested as follows: > > * Linux client and server: > * Test all corner cases (XATTR_SIZE_*) > * Test all failure cases (no xattr, setxattr with different or > invalid flags, etc). > * Verify the content of xattrs across several operations. > * Use KASAN and KMEMLEAK for a longer mix of testruns to verify > that there were no leaks (after unmounting the filesystem). > * Stress tested caching, trying to run the client out of memory. I'm curious if you've tried xfstests with your patches? There are a handful of tests using xattrs that might be good to check with, too: anna@gouda % grep xattr -l tests/generic/[0-9][0-9][0-9] tests/generic/037 tests/generic/062 tests/generic/066 tests/generic/093 tests/generic/117 tests/generic/337 tests/generic/377 tests/generic/403 tests/generic/425 tests/generic/454 tests/generic/489 tests/generic/523 tests/generic/529 tests/generic/556 Thanks, Anna > > * Tested against the FreeBSD-current implementation as well, which works > (after I fixed 2 bugs in that implementation, which I'm sending out to > them too). > > * Not tested: RDMA (I couldn't get a setup going). > > Frank van der Linden (13): > nfs,nfsd: NFSv4.2 extended attribute protocol definitions > nfs: add client side only definitions for user xattrs > NFSv4.2: query the server for extended attribute support > NFSv4.2: define limits and sizes for user xattr handling > NFSv4.2: add client side XDR handling for extended attributes > nfs: define nfs_access_get_cached function > NFSv4.2: query the extended attribute access bits > nfs: modify update_changeattr to deal with regular files > nfs: define and use the NFS_INO_INVALID_XATTR flag > nfs: make the buf_to_pages_noslab function available to the nfs code > NFSv4.2: add the extended attribute proc functions. > NFSv4.2: hook in the user extended attribute handlers > NFSv4.2: add client side xattr caching. > > fs/nfs/Makefile | 1 + > fs/nfs/client.c | 19 +- > fs/nfs/dir.c | 24 +- > fs/nfs/inode.c | 16 +- > fs/nfs/internal.h | 28 ++ > fs/nfs/nfs42.h | 24 + > fs/nfs/nfs42proc.c | 248 ++++++++++ > fs/nfs/nfs42xattr.c | 1083 +++++++++++++++++++++++++++++++++++++++++++ > fs/nfs/nfs42xdr.c | 442 ++++++++++++++++++ > fs/nfs/nfs4_fs.h | 5 + > fs/nfs/nfs4client.c | 31 ++ > fs/nfs/nfs4proc.c | 248 ++++++++-- > fs/nfs/nfs4super.c | 10 + > fs/nfs/nfs4xdr.c | 29 ++ > fs/nfs/nfstrace.h | 3 +- > include/linux/nfs4.h | 25 + > include/linux/nfs_fs.h | 12 + > include/linux/nfs_fs_sb.h | 6 + > include/linux/nfs_xdr.h | 60 ++- > include/uapi/linux/nfs4.h | 3 + > include/uapi/linux/nfs_fs.h | 1 + > 21 files changed, 2276 insertions(+), 42 deletions(-) > create mode 100644 fs/nfs/nfs42xattr.c > > -- > 2.16.6 >