Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp999807iob; Wed, 18 May 2022 18:51:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywfSZsbmtNLIJ7qiTxXHUZL4F9HQqd/h0RHdjOvJ+ddaFba2TkGu+6ZqdFL8Mg+/l7W4JU X-Received: by 2002:a17:902:eccc:b0:161:cad8:6ff5 with SMTP id a12-20020a170902eccc00b00161cad86ff5mr2401677plh.164.1652925104374; Wed, 18 May 2022 18:51:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652925104; cv=none; d=google.com; s=arc-20160816; b=WwJBwrRO78yHGcpX6XuzGNoQ41kgEq8E/Yt39+O/iENblT6eTm+q88HyBCkPnkL5CF FizD9IPZixnM4+6M+jlo3fbHKxAuboy54K+CNXhxgJAyVFuzjBmArgzSHDS/uu38ULXh aSaumn8PlHs5CCRlHoqv7t904s4hVKXhBlcgOkSc3rkOBAlvpCfsJdxNShQgv/6Bc1D5 SogirSBgEBTuKs1wTzaGG6hy6JbbnvO4bpG+/7RJau1QVfrxOazAZUp0u8QrXbSK3i9b PQvxHTRe0gFhOhfz6MtMxuOqmTxfR233rLh75aPJASJVzJg+OfDMdIlskPLhrGA+i1Su w/2g== 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=TOSFMQpyD/DjSbWOT1eZ+rjNyZM6llU3me+0ZONkNVU=; b=stgvlrI39fnTlLccPCYXjZFwi7+x7MLpwqmqVoe+MlEXkjccuhIAMYkPGCxbgSuba+ 1hPIc0JsStliYOhf405NgD3+V/KqJayZn+8NG9EMRkyaCIsDSJAOZVHJiiZo5c5IbieX JY8jmuX0/c0eD8hR1JsErj0WsrHntvlWRo8HfIHLZCJYwcFdghhFveDv1D41dHkvs5cw tTct5r4oKFIcvk9ceCDkUe45+8cwvXSAjGh9ZmHs9TkUx5Fx1iGI2BDBqrDhhkNFII7o T0UwgHFGc6mTRA62VKrK7vYnlcvSFmPMYOHK/eW5rPK8G5XxKRSK3Rd6R0pHKoD03jMk 89nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=iLkvZgWY; 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 g16-20020a056a000b9000b004fac74c8c8asi5934553pfj.329.2022.05.18.18.51.31; Wed, 18 May 2022 18:51:44 -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=iLkvZgWY; 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 S229578AbiESBlI (ORCPT + 99 others); Wed, 18 May 2022 21:41:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229566AbiESBlF (ORCPT ); Wed, 18 May 2022 21:41:05 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 991D71260C for ; Wed, 18 May 2022 18:41:01 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id 7EB0D1F45360 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1652924459; bh=cDPrEKf0JU2IBDHkl3+Mv2tvpcr+3lXlXVKIov5p0GA=; h=From:To:Cc:Subject:Date:From; b=iLkvZgWYP+ALK8iXHf9zqiw76OICiqcdmx1mw1Xn0FloGlQe/Z486G8+1Fprw+ZN3 /SFHFq2dqLv4lzjWqky6AOKodVt8ZfLA2WOc0UejC9dUtpk1PiUg9QdB/PoA1GlYlR SfcHrpKNtiIqvMbfNYMN8lZaVjSCyN8Wed+kZpZRGdZfHrTU4U32/rll5wTIIYjtNz kOvmiyH1lA98J75meUbNn6WkPGlTAb76e+uupJOvLJWKpn8ILKT7kG2QiAalEjuZpM vzECsjFLiyy2TJPdGniIMmt9Y9P4FkPeO4ZRt18VXYbnRG9y9rUjx+1KuuemJEcC+p Dg+aXselu+OoA== From: Gabriel Krisman Bertazi To: tytso@mit.edu, adilger.kernel@dilger.ca, jaegeuk@kernel.org, ebiggers@kernel.org Cc: linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Gabriel Krisman Bertazi , kernel@collabora.com Subject: [PATCH v6 0/8] Clean up the case-insensitive lookup path Date: Wed, 18 May 2022 21:40:36 -0400 Message-Id: <20220519014044.508099-1-krisman@collabora.com> X-Mailer: git-send-email 2.36.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, T_SCC_BODY_TEXT_LINE,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 Hi Eric, Ted, Sorry for the second submission of this series on the same day. Just a batch of simple fixes, so I hope it is getting close to merging. This is v6 of this series (thank you for the feedback!) . This picks up a few r-b tags and apply the comments from Eric. No big changes, all documented in the respective patches. Once again, tested with fstests generic/556. * Original commit letter 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. It also reduces the clutter from many codeguards for CONFIG_UNICODE; as requested by Linus, they are part of the codeflow now. While there, I noticed we can leverage the utf8 functions to detect encoded names that are corrupted in the filesystem. Therefore, it also adds an ext4 error on that scenario, to mark the filesystem as corrupted. This series survived passes of xfstests -g quick. Gabriel Krisman Bertazi (8): ext4: Simplify the handling of cached insensitive names f2fs: Simplify the handling of cached insensitive names libfs: Introduce case-insensitive string comparison helper ext4: Reuse generic_ci_match for ci comparisons f2fs: Reuse generic_ci_match for ci comparisons ext4: Log error when lookup of encoded dentry fails ext4: Move CONFIG_UNICODE defguards into the code flow f2fs: Move CONFIG_UNICODE defguards into the code flow fs/ext4/ext4.h | 49 +++++++++--------- fs/ext4/namei.c | 120 ++++++++++++++------------------------------- fs/ext4/super.c | 4 +- fs/f2fs/dir.c | 103 ++++++++++++-------------------------- fs/f2fs/f2fs.h | 15 +++++- fs/f2fs/namei.c | 11 ++--- fs/f2fs/recovery.c | 5 +- fs/f2fs/super.c | 8 +-- fs/libfs.c | 68 +++++++++++++++++++++++++ include/linux/fs.h | 4 ++ 10 files changed, 187 insertions(+), 200 deletions(-) -- 2.36.1