Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2439508pxp; Mon, 21 Mar 2022 20:30:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrqKjD0pmClRvWRRx9ehjWJ896jZloAv4c5caVAa1+YzJc4xmYFJt3PoI+T4R2U8MT8XLZ X-Received: by 2002:a63:e958:0:b0:380:132:5da8 with SMTP id q24-20020a63e958000000b0038001325da8mr20213105pgj.114.1647919840731; Mon, 21 Mar 2022 20:30:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647919840; cv=none; d=google.com; s=arc-20160816; b=NdhxeBxNvGpD59Vqi3JvuYeG1XelpAVJ2aF02yf9AFimd5rS1sFzFB5R9T6OrY0UG6 Q6mAu946j4L1/VqSB1fBg2NT3jQ5BrLVD1EYE6xwwWqMYjShql6LOSUvn3uJaJoSCro1 thkjNeXdo1kaAMrgS3kh7mx3/MS9ikrf/N27xDYOdU6ukxIE280IWK9DynG9lW5ovob1 UfT+9wkEG2oUzYNAWIhIEU+yaBaCCFlko33sU7JK0tAhu8hAKrwG5Bo+ex+5sQmBuJyL bmhXgpqwCKjOHm9rOyMggNwTY4egCK359FM2/1L33zc/0Ci8LfdIN/tw7xbWCbvJ7qxL WDbw== 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=Bg/8l6xHCZ2cUAwjP8/qhklXTRo8L5b4tNrRcO7JrjY=; b=EDxl+o6fIgkW81B9bApNiSlfEmvbcAwfg6bRj1ng77ybB+fOTDcNz/5vebYDqRr2+U tyHmjdORNt9U/IUYWLUMh/GA+psiKNfVhhNsDK92I2l3/0t6EzfpaOJeCJUSAVk2yBCv w6M9ZZoQy8Zb7KXBUDmueceUTqL6BDDLI8TD4u4OWjQQ5t8VxHFH37NsElt+FLXgXPXL P6MFINL8t81H3kP6gDyfKSMMTZyhY7Dv4MvmYdFpSGbMfhIYia+2Kb9tL9RNMkrEQzUG UpVQF6o2b2PlWqqo4f5e3lwwpHSQfY9+bts2I7XusxiapZZJyOnZqf7qF+M+kKZpS3at cu3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=N8Jb9a3y; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h19-20020a632113000000b003821688f7b8si13671762pgh.748.2022.03.21.20.30.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 20:30:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=N8Jb9a3y; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 163661FF218; Mon, 21 Mar 2022 20:00:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235728AbiCVDBn (ORCPT + 99 others); Mon, 21 Mar 2022 23:01:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235718AbiCVDBm (ORCPT ); Mon, 21 Mar 2022 23:01:42 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD2FC1FE55D for ; Mon, 21 Mar 2022 20:00:15 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id 1831D1F40876 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1647918013; bh=iuW/kNTAqjLM8QUg93SQL2oMf2dI2xLQL64Ee5Z2zks=; h=From:To:Cc:Subject:Date:From; b=N8Jb9a3yDkJIEFwBqDpNd3yrAh/7p3yjuD2Am3G22J17x4VL1EIZLXD54y+ARV78Z 3hpBIE6R/0BFqBZbvnOVYtH0Eu93U6bKGZdM4bia5GQW7CYF+AGZRzg2+1NsaQDQIS Qm7HG2mfipzg2SVkL8WxQ8Ewvw0gXfavuK17wBjId25KkUUwMGiw6u4hN+iUms3xyz y+kK6oDsNj0NceqrUCbDnHjt0fJdm1DwR5lTp1XaqeB9RAJc3LPMtAkZvg//zE9bek 3sKsNEaOpCs6nb/alSn9MlwshnI/0VCXsAutVoAilN598rbJ8/NuFMmgrW3YDHUgEm 4WOloqYE+EB3g== From: Gabriel Krisman Bertazi To: tytso@mit.edu Cc: ebiggers@kernel.org, jaegeuk@kernel.org, linux-ext4@vger.kernel.org, Gabriel Krisman Bertazi , kernel@collabora.com Subject: [PATCH 0/5] Clean up the case-insenstive lookup path Date: Mon, 21 Mar 2022 22:59:59 -0400 Message-Id: <20220322030004.148560-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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no 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 (not completed) 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 (5): ext4: Match the f2fs ci_compare implementation ext4: Simplify the handling of chached insensitive names ext4: Implement ci comparison using fscrypt_name ext4: Simplify hash check on ext4_match ext4: Log error when lookup of encoded dentry fails fs/ext4/ext4.h | 2 +- fs/ext4/namei.c | 110 +++++++++++++++++++++++----------------- include/linux/fscrypt.h | 4 ++ 3 files changed, 68 insertions(+), 48 deletions(-) -- 2.35.1