Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6969367pxv; Fri, 30 Jul 2021 07:02:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEdwIsPLGA48per99p9w676BSOQVH77bxnJ0uh9jjkKwQdEj3cxZirtZ/xW5TosyvGjczH X-Received: by 2002:a17:906:ce47:: with SMTP id se7mr2701306ejb.240.1627653749326; Fri, 30 Jul 2021 07:02:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627653749; cv=none; d=google.com; s=arc-20160816; b=beNAhroXoMUbhmBNr16GRZMlYT8j78+V635IQGVt+1cEI4IhAqtIe2aw7PzPlKkk69 rZVxO54/ozYfZg0HdQDUtu2B/kvhcxzFY19qYStnUNTmNSciySy/WEHZqb0ssWlJmpzY 1TQi40DDiXf1OcbWWO4kCS5KxWFg+UHxXQrZatRhA0OMalnHMEqU3ZL/U62ldav3RQJd opmaTeeaklowZTRQFsXWV2KikW8UNiBaf9UKM+FEOt74QNxfTnLMnMIBFNA7kege1NZI G4t06HfkUieRtPTrKfGCerFhC3yLNLP8wzS1BPwnJlx09EBbIrpf2fXxFQVssGKciF5/ Kqvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=kaBxRWryzhulnwmvI8GKhYnUSmQ8cVBnr1gpvWG23S0=; b=z5FK6Jx1Y9QbwkvCltPcdAGu8UgPUOY3b0EDPZn0jND+8xp+NQops9xs0DZX6MlMAB M20Kk15xDIUY8EoOgkKR1qOXsIPeygCYJlEc4fTNZXbshurebuMkpfomzVMrnLz5lBwt lGOaflVfaW03096xeQcRORb02NgniE1pnt/14hcrOpaIyA0ZOavWMKXNu+OkIxcpKR5f bk/RT/iHJYkQJZKwpzLaMfmB4LMfpGmhLi0crbihwLjDFHEp1oSkoiHRlmYf9rXNJlC9 vrUFENPFauyLKj4BHFSVPmAk48cfs26xVW7cBIbJPqZSwOXVpeAk3hLgBEfrHp/IfYFV h1rQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e11si1654821edv.530.2021.07.30.07.01.48; Fri, 30 Jul 2021 07:02:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239015AbhG3OBm (ORCPT + 99 others); Fri, 30 Jul 2021 10:01:42 -0400 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:33153 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231247AbhG3OBl (ORCPT ); Fri, 30 Jul 2021 10:01:41 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=eguan@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0UhRhdA5_1627653694; Received: from localhost(mailfrom:eguan@linux.alibaba.com fp:SMTPD_---0UhRhdA5_1627653694) by smtp.aliyun-inc.com(127.0.0.1); Fri, 30 Jul 2021 22:01:34 +0800 Date: Fri, 30 Jul 2021 22:01:34 +0800 From: Eryu Guan To: Hao Xu Cc: fstests@vger.kernel.org, linux-nfs@vger.kernel.org Subject: Re: [PATCH] common/attr: fix the MAX_ATTRS and MAX_ATTRVAL_SIZE for nfs Message-ID: <20210730140134.GM60846@e18g06458.et15sqa> References: <20210730124252.113071-1-haoxu@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210730124252.113071-1-haoxu@linux.alibaba.com> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org [cc linux-nfs for review] On Fri, Jul 30, 2021 at 08:42:52PM +0800, Hao Xu wrote: > The block size of localfs for nfs may be much smaller than nfs itself. > So we'd better set MAX_ATTRS and MAX_ATTRVAL_SIZE to 4096 to avoid > 'no space' error when we test adding a bunch of xattrs to nfs. > > Signed-off-by: Hao Xu Since the xattr support is relatively new (merged a year ago for NFSv4.2), I'd like nfs folks to take a look as well. > --- > > It's better to set BLOCK_SIZE to `_get_block_size $variable` > here $variable is the localfs for nfs, since I'm not familiar with > xfstests, anyone tell what's the name of it. fstests doesn't know the exported filesystem under NFS, so I don't think we could the block size of it. > > common/attr | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/common/attr b/common/attr > index 42ceab92335a..a833f00e0884 100644 > --- a/common/attr > +++ b/common/attr > @@ -253,9 +253,13 @@ _getfattr() > > # set maximum total attr space based on fs type > case "$FSTYP" in > -xfs|udf|pvfs2|9p|ceph|nfs) > +xfs|udf|pvfs2|9p|ceph) > MAX_ATTRS=1000 > ;; > +nfs) > + BLOCK_SIZE=4096 > + let MAX_ATTRS=$BLOCK_SIZE/40 > + ;; > *) > # Assume max ~1 block of attrs > BLOCK_SIZE=`_get_block_size $TEST_DIR` > @@ -273,12 +277,15 @@ xfs|udf|btrfs) > pvfs2) > MAX_ATTRVAL_SIZE=8192 > ;; > -9p|ceph|nfs) > +9p|ceph) > MAX_ATTRVAL_SIZE=65536 > ;; > bcachefs) > MAX_ATTRVAL_SIZE=1024 > ;; > +nfs) > + MAX_ATTRVAL_SIZE=3840 > + ;; Where does this value come from? Thanks, Eryu > *) > # Assume max ~1 block of attrs > BLOCK_SIZE=`_get_block_size $TEST_DIR` > -- > 2.24.4