From patchwork Wed May 31 03:13:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingbo Xu X-Patchwork-Id: 10079 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2621335vqr; Tue, 30 May 2023 20:59:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7xwjQTY8Xk2xSfsVXjgX1NQh7xQR7JVxhTck+eibt0zmXRmo0S5jmda7cxCwC3zIrnJpZQ X-Received: by 2002:a05:6a00:2393:b0:64d:2a87:2596 with SMTP id f19-20020a056a00239300b0064d2a872596mr6602141pfc.10.1685505566420; Tue, 30 May 2023 20:59:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685505566; cv=none; d=google.com; s=arc-20160816; b=lc77qb6CynDASghS8Hjuf5DlAvzOzADP+c1zuzK7O66lOXhfdwYBbFQ6tnqyV5xEd0 OWA1NOZi/lnuZcKlQJB+mAovBna+u8OSuM5/7dUXGC36gEUNDR/sqdPXmOTTFDYpgTsz sR4l/nJ8B2hQ6XmXTdhxg4D7mVk9oKIRcAjXHGfePfOfNfEEIhI20EmwLalj2m4nwVPt o3Yu04BnKDnuu64nLwNwFhFGFsZ/JjNGdIo0VpmBihlvXV1Zm+pmqTuKQmWCZHs2PzI0 /sL58mf99ogo8Vb3Trs9TFZb2Vva+XwRguQTcF5oSstCtGtTGxjBqHizvPCqe9Cn1q1r vV5Q== 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=hMv6MGGaV1Zb0kngbW3RrtKXVXsycn3/sxlrU6/hyfE=; b=nDMB/N+Bd87ellSHao5F7xuL0NNi/mQ/NTfEs8WPtUKZ29+/xDX21lL9KMBeEkKns9 dVnTQPSVWhk0iI0DLg1QQ3avzYygO+YZEjlKhBU6psaPZ0c7sES7ZICUDxQGCUBhDfBs Z8xCkFmjAclnjTbLsrHM+AlcnY6IZPGeF69bkHkStP7xQz/2QWSu5iTPeB5zVXu8QsIz V33L+RzLAbqzN+AXeqLW04sKKbetq0Hz6CmnKVtHyHpp+C23+vPkANo8nTBscB3rgx9X 556Ay68WMLzg+Gk6qqKkXGhIdTd0JnNtRWk3lLxZN2L9fx+YvMT0tJuN9vozXWKJyr9/ KzVQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p10-20020aa79e8a000000b0064672de37cesi2818131pfq.192.2023.05.30.20.59.14; Tue, 30 May 2023 20:59:26 -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 S234050AbjEaDNh (ORCPT + 99 others); Tue, 30 May 2023 23:13:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234038AbjEaDNf (ORCPT ); Tue, 30 May 2023 23:13:35 -0400 Received: from out30-118.freemail.mail.aliyun.com (out30-118.freemail.mail.aliyun.com [115.124.30.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 313C3EC for ; Tue, 30 May 2023 20:13:34 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R481e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0Vjvoozt_1685502810; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0Vjvoozt_1685502810) by smtp.aliyun-inc.com; Wed, 31 May 2023 11:13:31 +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 v4 0/5] erofs: cleanup of xattr handling Date: Wed, 31 May 2023 11:13:25 +0800 Message-Id: <20230531031330.3504-1-jefflexu@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.6.gb485710b MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767380684974471907?= X-GMAIL-MSGID: =?utf-8?q?1767380684974471907?= 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 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: enhance erofs_xattr_iter_fixup() helper 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 | 683 ++++++++++++++++++----------------------------- 1 file changed, 265 insertions(+), 418 deletions(-)