Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp547108rwd; Thu, 8 Jun 2023 04:44:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4DfDAYIRm/bOa5AjI3gF4tC3/V3bl3Y0kCAwtWjL7W87UUFUGF9bwKeqdOooOxTcHQx7DQ X-Received: by 2002:a92:4a12:0:b0:33b:6f65:2dd0 with SMTP id m18-20020a924a12000000b0033b6f652dd0mr8966689ilf.29.1686224656196; Thu, 08 Jun 2023 04:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686224656; cv=none; d=google.com; s=arc-20160816; b=fLPTiFokusVexKdlvSmGIegu0c7/yceTJm0PG/Kx8dwje7bFD7IKCnk15x0PFf5vRp PsS74ObEnGfm8T06F8egbFwZGHPxrsqse3xh4rk2yCj43NRnXFvk2/SXPO9kcylv/vJd nPFJSeKQXeHT2j7hEs0w7PgakFh+a+rkyi4BHWvtM4UobbAoKOmMzt6KtUv530IvKKp+ qNqnt2q+uzgtGpwdMWBQerEW9Ge/xVC5Ukh1ntE4P0B7Yt4aOfFYSHdyXEoalSiPDSxH ijxPlmFZKgA++k7aS2RptkOPSqlZJgXDbk/7VU8DBdiTnFacLwhy6u2JSkYfPS2w1e6b 9h2g== 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=n2ij9fHjySodHNzLwFyBLWHZEGFF1trb9bRZThjp6ec=; b=pp8Hw3GnURXiEzjdKo6H3FQJ1LRGTXiFZEvq6V4Ooh+Tbh1C0/6ESvsIaTqbqQ3dEK vXnpyk/tx8/aEI+l6ENkR7oLzeTXymkefS8uVxtfHq1X/v2jgEFCwwnm/UHufOWhx6nc yd2KBxViP069ByLnGa/QOi0e5OwBdgrl7tLTd6B+QufqARqnozN4HU2bkXEETXJDa/kg E3PM8PI+hzQmY/OGD2OG1yuQD850vJ7B3bSi8RW6CdvJOw1JszSa6bUpUdSStBygNKrv vnqG3IcZ0xCP/ayVHxMXrEcIMoesC2VAWqZnxX5y4jhRwYTBH6e9jl2+N1FnORtT0Xiu qonA== 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-20020a170902e5c800b0019ec2a633f4si939289plf.505.2023.06.08.04.44.01; Thu, 08 Jun 2023 04:44:16 -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 S235361AbjFHLak (ORCPT + 99 others); Thu, 8 Jun 2023 07:30:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235738AbjFHLah (ORCPT ); Thu, 8 Jun 2023 07:30:37 -0400 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9F132711 for ; Thu, 8 Jun 2023 04:30:23 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R421e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0VkeCuqc_1686223820; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VkeCuqc_1686223820) by smtp.aliyun-inc.com; Thu, 08 Jun 2023 19:30:21 +0800 From: Jingbo Xu To: hsiangkao@linux.alibaba.com, chao@kernel.org, huyue2@coolpad.com, linux-erofs@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH v6 0/5] erofs: cleanup of xattr handling Date: Thu, 8 Jun 2023 19:30:15 +0800 Message-Id: <20230608113020.66626-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 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 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/share xattr iterators for listxattr/getxattr erofs: use separate xattr parsers for listxattr/getxattr fs/erofs/xattr.c | 652 +++++++++++++++++------------------------------ 1 file changed, 227 insertions(+), 425 deletions(-) -- 2.19.1.6.gb485710b