Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1392663iob; Fri, 29 Apr 2022 04:36:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyf2J4E6wW7yez9EFnB2gvbnFuUjbkdjF4NM1fC080KR9z+cna+SAYd8PNVjO/S11BsZnBm X-Received: by 2002:a05:6a00:16c7:b0:4f7:e497:69b8 with SMTP id l7-20020a056a0016c700b004f7e49769b8mr39312839pfc.6.1651232217573; Fri, 29 Apr 2022 04:36:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651232217; cv=none; d=google.com; s=arc-20160816; b=x/kZcGlYz88T4hk3ralyFCDqOdrihoSrVHINfNDCmAjvOuaAj8Dckth8PdVnUj/Wdc teF31Ycrb1n2+oiD+dQWx/aIn5gOV9+T47jgXJNYdHloBbV2orXunOpEnQlSZgd7gjgj oDiSLsTPI5zfB1mpOPmbP6X19UzIGKA9fvMsXmqPyxMWhgmuQdP+dEfreKdtmbblfqQh KBeFIqURAJHTeytBxH4Us9vwk1+zuTSxffXGNhxgvUb46m/bmAS1vTh6XJAHJ/XP9e8M 0X7EIqMXKzKddlxQq6067lHxfAO88L0C5fDckgHBUW5+LxcaxHWnRMXzcTNGC89jWeOZ j4Dg== 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:dkim-signature; bh=ZKMEGI3aDCF4Hb/w532lTrDHni4JK/XD1JSEVzKbVlk=; b=Swqc7IJo4gfUFql9HPRnuSkmstyX3DIQoLDi0TdtmaRGmsyqfzPqTtkisPQLtZnC65 tJilF+o+JI+zHaOi3q4TmJoYGdCfbXgWyEePHHCCuyKCfmTVecMeHZh8jGiD4J1V6fFW W5noiyTDKEuf6zq0QUXPrdWiIWq9kx46ff4e8vcw7pV51JQYR11eEPj1jZEE/ICdzqX5 0+X2+EqeUAamQS1l+TskuPC0T+3gZP2DgtH6ocwP1dUn4FR4ms8Hfuk7PfcThX+2VnPX o1ncjSGwbgnbcwfh5Rek8NCnIIDDpjgb62dn40yA9nNc616Hxf21MEymrKLN8LRlZ8ma X4EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=n6W+0k1R; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d14-20020a056a0010ce00b004fe4e23e4f9si6968480pfu.262.2022.04.29.04.36.37; Fri, 29 Apr 2022 04:36:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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; dkim=pass header.i=@collabora.com header.s=mail header.b=n6W+0k1R; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352788AbiD1WOB (ORCPT + 99 others); Thu, 28 Apr 2022 18:14:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352812AbiD1WN5 (ORCPT ); Thu, 28 Apr 2022 18:13:57 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF70A5B3D7 for ; Thu, 28 Apr 2022 15:10:41 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id F32B91F4247A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1651183840; bh=bcfClgonf+RR4NyaZu4xkE6VsQ2rDh7rY79Hk2fkr/0=; h=From:To:Cc:Subject:Date:From; b=n6W+0k1R5Hnp5cLFsP8gLdcYlA2KDLKx12h/b1DC2byjWE3xs7D8z1Y5f9bYLlQxA 6ejaZiPS6Idg8XOKU+bX8ZnlFB7KeW5vTK5tZyqoIa6L9khwCwC62OYQia7VVHT7ak JpfJFecAaLc4QnIncRvaGmyRbOn9YoxS6i7Ri99GO2aTgStTeHKxGXT1zXd+6AuMA0 f1QZJ2aQ0lgcAHhM4fXFselCaI2h0qlzpO8JD2kGjv/JNnw8RaPBStiZ74jkJ5k/hu ijQc1Qrvw3ZbPGh/SUODOxLDc9Rme8ZYdBmn2ta63HXnob4d9eZSRFcrw1SWP8qw+9 95dcCFsUrplQw== From: Gabriel Krisman Bertazi To: tytso@mit.edu, adilger.kernel@dilger.ca, jaegeuk@kernel.org Cc: linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, ebiggers@kernel.org, Gabriel Krisman Bertazi , kernel@collabora.com Subject: [PATCH v2 0/7] Clean up the case-insenstive lookup path Date: Thu, 28 Apr 2022 18:10:20 -0400 Message-Id: <20220428221027.269084-1-krisman@collabora.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, UNPARSEABLE_RELAY 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-ext4@vger.kernel.org This is the v2 of this series. it applies Eric's comments and extend the series to complete the merge of generic_ci_match for ext4 and f2fs. The case-insensitive implementations in f2fs and ext4 have quite a bit of duplicated code. This series simplifies the ext4 version, with the goal of extracting ext4_ci_compare into a helper library that can be used by both filesystems. While there, I noticed we can leverage the utf8 functions to detect encoded names that are corrupted in the filesystem. The final patch adds an ext4 error on that scenario, to mark the filesystem as corrupted. This series survived passes of xfstests -g quick. Gabriel Krisman Bertazi (7): ext4: Match the f2fs ci_compare implementation ext4: Simplify the handling of cached insensitive names ext4: Implement ci comparison using unicode_name ext4: Simplify hash check on ext4_match ext4: Log error when lookup of encoded dentry fails ext4: Move ext4_match_ci into libfs f2fs: Reuse generic_ci_match for ci comparisons fs/ext4/ext4.h | 2 +- fs/ext4/namei.c | 110 ++++++++++++++------------------------------- fs/f2fs/dir.c | 58 ++---------------------- fs/libfs.c | 60 +++++++++++++++++++++++++ include/linux/fs.h | 8 ++++ 5 files changed, 106 insertions(+), 132 deletions(-) -- 2.35.1