Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp842328rwd; Tue, 13 Jun 2023 00:45:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4KrA6N83BnZI+sLB48uN2HR+zIwz2YHVzPuSfoNIZ7zyMIoP7ho6MYLnx4bHZtuXfC7rRL X-Received: by 2002:a17:90a:fc90:b0:25b:df6a:bc6f with SMTP id ci16-20020a17090afc9000b0025bdf6abc6fmr4613587pjb.22.1686642322986; Tue, 13 Jun 2023 00:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686642322; cv=none; d=google.com; s=arc-20160816; b=ynSTGtyQlEmwf3dPwmfGsr75nuwOF7ycCFCXMhPGsl21k+v7R7l7Gif+OqMjqAsd4A 7v3LZAi9smZR1NOvwI4Jp2GC7LaSo6IH2QazXBgC6Jv9pcakD7nAop67v5/fZhlfB8nu AOrE8IONnDQEKM1VL+PshxujQRyippmN/xB9wZGIERX1z7NBCGROUpS1Y+edYYEd3G71 4Q+NK8CftrCcWKmdHz+cMkYaibxYMiVvpkGy2S2aCOl1qE3TMIPm5UYNGMQYFK+NtDd6 Pj+ghvBLPseENdnQcCTsWzv/9a1WLVI1CUri2YX7KAw6/hE/YSVcBUsfl4/XEmrvzovp +ZAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Jia1Hix/YN1ZWWCV6o5Z9/JLzNuvATrWF79IwRrwouM=; b=r5Wuz5Fy5EvlqRgHcO3Z3IrzL54a8jex9Wmd352lqM1hDfbgWmozvaKToc/6K+796n hRu9dl6JAVYFzsuhhbjblA2ZJBc7BtngFoyIey8/KtoKuDq9oPY0TRU5Tqq5FzQ1HH8s 7WQHiEdHynQ5rL4YjHG3rmyM/SRcAGo6EjJxtRg2JlZ5gEmIlClfdISDNnSlYA4yP2B3 MiOmUVfej1PpitmIa0Ehm2za9cJX5Hs5pch7YMbIH86lYA9+KEgdBuugxgE1ye1ieql+ 94JL53fhCFiPgrameuNjfc10mwjy5q6QHemXRBQU7/B52mVhmXtaBqXD6WPMrzfuV73j +1iA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u8-20020a637908000000b0053b8874ceddsi8708111pgc.148.2023.06.13.00.45.10; Tue, 13 Jun 2023 00:45:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S235139AbjFMHlV (ORCPT + 99 others); Tue, 13 Jun 2023 03:41:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229630AbjFMHlT (ORCPT ); Tue, 13 Jun 2023 03:41:19 -0400 Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D8B0CC for ; Tue, 13 Jun 2023 00:41:18 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R791e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0Vl1HGOl_1686642074; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0Vl1HGOl_1686642074) by smtp.aliyun-inc.com; Tue, 13 Jun 2023 15:41:15 +0800 From: Jingbo Xu To: xiang@kernel.org, chao@kernel.org, huyue2@coolpad.com, linux-erofs@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH v8 0/5] erofs: cleanup of xattr handling Date: Tue, 13 Jun 2023 15:41:09 +0800 Message-Id: <20230613074114.120115-1-jefflexu@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.6.gb485710b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org changes since v7: - patch 1: add Reviewed-by tag - patch 4: s/erofs_iter_inline_xattr/erofs_xattr_iter_inline s/erofs_iter_shared_xattr/erofs_xattr_iter_shared - patch 5: polish commit message; tweak overly long lines changes since v6: - patch 1: s/__u32/__le32 in calculation of it->pos (Gao Xiang) - patch 4: polish the commit message (Gao Xiang) - patch 5: s/erofs_xattr_handle_string/erofs_xattr_copy_to_buffer (Gao Xiang) changes since v5: - patch 1: newly added into this series, in preparation for the following cleanup - patch 5: rename erofs_xattr_body() to erofs_xattr_handle_string() changes since v4: - patch 1: make conversions from erofs_read_metabuf() in xattr.c to "erofs_init_metabuf() + erofs_bread()" a separate patch - patch 6: add "bool copy" function parameter to erofs_xattr_body(), and thus make erofs_xattr_namematch() and erofs_xattr_copy() inlined inside erofs_xattr_body() changes since v3: - patch 1: make a unified erofs_xattr_iter_fixup() API with newly introduced "bool nospan" argument; call erofs_init_metabuf() and erofs_bread() separately instead of erofs_read_metabuf() - patch 2: avoid duplicated strlen() calculation in erofs_getxattr(); no need zeroing other fields when initializing 'struct erofs_xattr_iter' - patch 4: don't explode 'struct erofs_xattr_iter' with inode/getxattr fields; instead pass inode/getxattr parameters through function parameters of erofs_iter_[inline|shared]_xattr() - patch 5: don't explode 'struct erofs_xattr_iter' with remaining field; instead calculate and check the remaining inside erofs_iter_inline_xattr() changes since v2: - rebase to v6.4-rc2 - passes xattr tests (erofs/019,020,021) of erofs-utils [1] [1] https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/log/?h=experimental-tests v7: https://lore.kernel.org/all/20230612123745.36323-1-jefflexu@linux.alibaba.com/ v6: https://lore.kernel.org/all/20230608113020.66626-1-jefflexu@linux.alibaba.com/ v5: https://lore.kernel.org/all/20230601024347.108469-1-jefflexu@linux.alibaba.com/ v4: https://lore.kernel.org/all/20230531031330.3504-1-jefflexu@linux.alibaba.com/ v3: https://lore.kernel.org/lkml/20230518024551.123990-1-jefflexu@linux.alibaba.com/ v2: https://lore.kernel.org/all/20230330082910.125374-1-jefflexu@linux.alibaba.com/ v1: https://lore.kernel.org/all/20230323000949.57608-1-jefflexu@linux.alibaba.com/ Jingbo Xu (5): erofs: use absolute position in xattr iterator erofs: unify xattr_iter structures erofs: make the size of read data stored in buffer_ofs erofs: unify inline/shared xattr iterators for listxattr/getxattr erofs: use separate xattr parsers for listxattr/getxattr fs/erofs/xattr.c | 663 +++++++++++++++++------------------------------ 1 file changed, 235 insertions(+), 428 deletions(-) -- 2.19.1.6.gb485710b