From patchwork Thu Feb 15 04:26:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 20410 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp164297dyb; Wed, 14 Feb 2024 20:27:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVmvrJf/DI9t2KwxJDZMsCz5JsmGF9g243hVES/x4P5xd8MJWJTZk0Az8K2OgWoXa+guzWOnGDjHjZKaFxEt3mKZ76SpQ== X-Google-Smtp-Source: AGHT+IGEgTVsiZ/yY9nys8jQe+pZ7+eW/BKA5qYwiZYM4s2zC248oHnJu0jXmAIlWwqjYsHb874b X-Received: by 2002:a05:6a20:9f97:b0:19e:6ea7:dfb with SMTP id mm23-20020a056a209f9700b0019e6ea70dfbmr6313536pzb.28.1707971256311; Wed, 14 Feb 2024 20:27:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707971256; cv=pass; d=google.com; s=arc-20160816; b=JkoBE8yEbPWrQp3zWhtpmzFjeihU+hKBJ4avFPj8oX8ba1xK1LN1eBIEcUJ+wEPuBZ Bo4XiLOpgvGc3954wyG8pf6oiCASyltgfZlYJ0W+cGCy/ik+llFJ7gK0RArnN5Z0UcYN 9tnZopPNqW/oy13+XSWQTHB2n2QasPg1H8b06c/vUXtrjSvW4vhgcyQo0xNeaFMXJvfZ 1MiVd8bLlnqX76WaQkIFEfy/eRwB2yC9OXnnbZ7OVijm0K/8jNH4ZREVzBfHfT3NJ5oD QY1lvFAeoSByc86lDQyDnCXTqN5m7jh+nGNSlLjUmoYs13XEPBh5hk0/uZVkjndSFT2z OP9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=K9gKAQaJ7+Yguk82kUDim7zFRXYTG7iS4k1wV2s6dBo=; fh=leNjPu/3B1/amj8pWgnZPg+v2NORBP0eXUn2DeKKAIs=; b=xexx+O2pkX4et1dmXiNLd51dcQPDYeQAb6Qi+liiHxhlgTA4wGbFFOKoZTFa6d9RzW MHm8hm19TyuqDVGaQvSuoK/JzTQvwnRHupxufqX8EYK1bDz9rh5r+Uba/CC6cGm51dIb H3iubbA73wkz3AyDXEx0HmMLtToxpqWxAfzeONL6Mo1OYQFGNOLWW6oa5IGW894uiS0k p9jJ/ERlJDNC4HQv5aojtL4a+2bTrKHKlHPyYXSi0/lEy2+MKuFeFYPEfTmP+LmW98u3 b55A30PEV2BpzXhT4JmXFuNUBokfCQqR+54aJBArvbTHaVO2UVj8V3bt3gl9d1JN5AdE fBKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="OA/uhMmf"; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-66284-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66284-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x62-20020a636341000000b005dc8a259903si405292pgb.453.2024.02.14.20.27.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 20:27:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66284-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="OA/uhMmf"; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-66284-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66284-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 194D6290CF7 for ; Thu, 15 Feb 2024 04:27:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CDAACC142; Thu, 15 Feb 2024 04:27:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="OA/uhMmf" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A039B3FC2; Thu, 15 Feb 2024 04:27:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707971235; cv=none; b=T6rjws5H/JRZhzi1PaUkDuPNndGA/26/IXE2K1NRxuyBRSQ1+excY0QiaZpf1BFr3zSDMwwL2p59pZv8cQGRwfpKKUyNaYKMEXshYtVOn5vZc+3VM9dbAdPrelfojOP5Q38/UDkV+VwyeIkuX6qiq1FBhXbemHmRSzVfqWkb5kA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707971235; c=relaxed/simple; bh=tQGS++QsKX4V8fgN6HgD2SBMUmY3q2X6YeBS6EZkOno=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Gtdbug1DHJURIRVt3dSIyiwUjFnaLr9Qqgnt6BF1POwAKedDJwRyzspOQt32DAEDeg+QDnkwLQlU/ebB7W/M1wQfBgwkMGz/wV5xoaQFsG18a17HiP87n07QxvkYG9LVbwIz+bAzZWHIcZAYvtEknXETII46n3xakhpkRGd/rtU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=OA/uhMmf; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1707971231; bh=tQGS++QsKX4V8fgN6HgD2SBMUmY3q2X6YeBS6EZkOno=; h=From:To:Cc:Subject:Date:From; b=OA/uhMmfKTb+Iz2xz+8XQR2v5h6L+UVZQd3uJ/aJB+/Y2G7zxsw41lsJwHgkYUm20 1enisnrGRX+sCrZ0FzJMYPtbpZ6xyXM0dQ/zZpf+8hdvFTF6MDPighQY8W3AilG+wt /Uf9OG/SrI8symQsoYkI+g82DfiplKVd+Pf5SNPqq1Wgq3l7mmdrFudPTguKzyM1da Sxlq5jFQjfClSpTtfdTBq0QeUEgS8GRyc2DjuZNx7Yae0Y1IgEt5LFqJWZ5dbHJXL2 fFtZa3YcmBF6OXsNQ+rKCvuQ7lTwJbq8isWaA3TKuOYRoMuP9ghCYfBFFrvTwxlFOb cPjIQfJJFFf6A== Received: from eugen-station.. (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: ehristev) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 157A3378203F; Thu, 15 Feb 2024 04:27:06 +0000 (UTC) From: Eugen Hristev To: tytso@mit.edu, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, jaegeuk@kernel.org, chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@collabora.com, eugen.hristev@collabora.com, viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz, krisman@suse.de Subject: [PATCH v10 0/8] Date: Thu, 15 Feb 2024 06:26:46 +0200 Message-Id: <20240215042654.359210-1-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790937667533553034 X-GMAIL-MSGID: 1790937667533553034 Hello, I am trying to respin the series here : https://www.spinics.net/lists/linux-ext4/msg85081.html I resent some of the v9 patches and got some reviews from Gabriel, I did changes as requesteid and here is v10. Changes in v10: - reworked a bit the comparison helper to improve performance by first performing the exact lookup. * 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/crypto.c | 19 ++----- fs/ext4/ext4.h | 35 +++++++----- fs/ext4/namei.c | 129 ++++++++++++++++----------------------------- fs/ext4/super.c | 4 +- fs/f2fs/dir.c | 105 +++++++++++------------------------- fs/f2fs/f2fs.h | 17 +++++- fs/f2fs/namei.c | 10 ++-- fs/f2fs/recovery.c | 5 +- fs/f2fs/super.c | 8 +-- fs/libfs.c | 80 ++++++++++++++++++++++++++++ include/linux/fs.h | 4 ++ 11 files changed, 211 insertions(+), 205 deletions(-)