Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp272698iob; Wed, 11 May 2022 14:10:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4HezDyDQ164jV+GZhg9xh+kuiHRhA4lU7X4hpK0/7a+DBZsQrit58X88uRQWzju4+TRFj X-Received: by 2002:a62:1613:0:b0:510:82a9:e3bf with SMTP id 19-20020a621613000000b0051082a9e3bfmr25675281pfw.23.1652303420285; Wed, 11 May 2022 14:10:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652303420; cv=none; d=google.com; s=arc-20160816; b=VFB0j1EsuJK48BCo0XaOlkY02jLym8+xQaP8KdqM9wPt7+Owagu7uodeqBlzdpunwz iuA13ZiqAsN4Ph1rWM0lXDcwcyeEEP0UFoyIPw1KjOF5wnG8dhXR/UTOl7txoXwsyFil sl0KmoQ6JfnIUB3iJ9YWXTnk/rNvOgOcAL2r0g8fepYWE+NQj1udqngAqU9GA8kl9gTh St4cP4Yw+J/WxWXSaZr1s4hdNnhvO5e9D3wf6WunfzjPa5c9qb59m1TWX70erOgZyKsY q7rrLjawN32TGehmMEeIQaiXvsg/akr//XOrP8xNTEKxgXKoiC4eKQX9wXCQ4mNHU1uk oRIA== 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=xQwLrEWORaYJiRu+kXjqbctu8Kb/hVUlReH1MwlWlAU=; b=SzJjjolE4d2WLOCKZZxf+v4WCEY9VB1VI+laWJn5XBPluRP642zkW+4qSzzmkGmUJc Pq3J1y7B0v+zINLkITSycC4pFinEAkgcGeil+5bR4yHAA9vjPCQRjtKbwfliWuPnP20t pFi2cG/QKtsON5XpDqKaAU7wCfLLHkLXKYS7yLI6HxxIYgKH/aWY9DGm+0CiakmcG2Sm gOoeGXpJ6M26CLVA18QiS+LyhZEyB5VI9Ibqdj4ytuulIQghj18ZPh6Ae81i7L5BvYdY UjhspW6SBJPePwnLnN95OE8wF/C8ZrSIQRXTe5RHQOWhdz9uim3ammVYz1wwXGNxG+0N mnZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=njLxSzNx; 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 lb16-20020a17090b4a5000b001da35d6c55csi967704pjb.175.2022.05.11.14.10.05; Wed, 11 May 2022 14:10:20 -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=njLxSzNx; 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 S1346859AbiEKTcB (ORCPT + 99 others); Wed, 11 May 2022 15:32:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245340AbiEKTb7 (ORCPT ); Wed, 11 May 2022 15:31:59 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8557B69484 for ; Wed, 11 May 2022 12:31:57 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id C53011F42914 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1652297515; bh=YVY7Dsj2P/gpMxAXakIigK52MS4RKuWy4L2G7t4v4ns=; h=From:To:Cc:Subject:Date:From; b=njLxSzNxseww7v2/JuRZpGc16AWA+FBP9wCkyyUOSmMNMH5EAmkvg2pVq1baaz/i4 BzZJHSxMys7Yijf6wyRcfrufLRTBySTCtLvkLUEkL3HNPgMajilAFZbXJNtNfdFOc2 zeR7IL6TBM/giBK0xABWc6iZYV9xFZJ5PEEs1SvONWnTWRxXE8GQtnlWf8wDpb3baQ LvfjCNYrP6Z1YmVyIKx4U6Swxt7O996r+r4BjLhvob7S3y2wiaMlrfvNpNhLfSLscg oTGZwYyUOhkNtPXxq5F4/eL3BUuGc0WIGQ78zXoP2kBz9U1DRDLFEoYICL+n9oFHuW tzlGv3g9l+B1w== 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 v4 00/10] Clean up the case-insensitive lookup path Date: Wed, 11 May 2022 15:31:36 -0400 Message-Id: <20220511193146.27526-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,URIBL_BLOCKED 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 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 (10): ext4: Match the f2fs ci_compare implementation ext4: Simplify the handling of cached insensitive names f2fs: 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 ext4: Move CONFIG_UNICODE defguards into the code flow f2fs: Move CONFIG_UNICODE defguards into the code flow fs/ext4/ext4.h | 41 +++++++-------- fs/ext4/namei.c | 126 ++++++++++++++------------------------------- fs/ext4/super.c | 4 +- fs/f2fs/dir.c | 103 ++++++++++++------------------------ fs/f2fs/f2fs.h | 3 +- fs/f2fs/namei.c | 12 ++--- fs/f2fs/recovery.c | 5 +- fs/f2fs/super.c | 22 ++++---- fs/libfs.c | 61 ++++++++++++++++++++++ include/linux/fs.h | 8 +++ 10 files changed, 185 insertions(+), 200 deletions(-) -- 2.36.1