From patchwork Tue Apr 2 15:48:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 13614342 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 57C1ECD1293 for ; Tue, 2 Apr 2024 15:49:23 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1rrgO2-0003HF-N2; Tue, 02 Apr 2024 15:49:23 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rrgNt-0003Gj-K6 for linux-f2fs-devel@lists.sourceforge.net; Tue, 02 Apr 2024 15:49:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ih2S6pyJj+FNOX2FaVqCPxiJGRm/mQyzBzMM/MkTjGU=; b=N/8WUCqfqH2DFkHvXUymxjPVQu 9B84YpilNqyq28bEfTNkj18aijrCtcDWm2LwTq6NFdH2AffzNrVL1ocX5gpwtPPi6AkiX/KOXb0ll mRwK183q/bI2owbvgdmWtkSG+WoUcv3f2aMV/UgqAQInmpc0On2kQuMKY8lBgDgb8JLE=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ih2S6pyJj+FNOX2FaVqCPxiJGRm/mQyzBzMM/MkTjGU=; b=OkKor18hvV75JQ0MCW3qxtnIEw hcO2OXxvGzVBei+l+endWHdnaAUHmUoHi90/y3/JCbyptXfhZCCiSLLOIpZMRXvAuWXh/MykLxzC1 SLz42mDeZrbKPjopyXwGw3JqlPefamtbwDdzzq9FUI9Wcmab3SUsTUs83lXPI7hyqhRE=; Received: from madrid.collaboradmins.com ([46.235.227.194]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1rrgNs-00043w-P4 for linux-f2fs-devel@lists.sourceforge.net; Tue, 02 Apr 2024 15:49:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1712072935; bh=3qqbmy6OIcOoO07cO28FmCqjE206p+74Pkl9CCe0L8Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SgZfM4j8m0wWn0DNkDq46LDfpOBCGT3bILSbqHsGSkUxpPo4b81IwwPrajdoCRvtX I9p71M+M9+37cLUTdwD9efeNnm8NGbKKT5AELMTUDi+9Js+xv+kx/NzGqOxwd7Ary/ zG2nBh7kWJFz5w1UaHVgfrRvJ1LcMygbfanLp168vvYaX6KcLSAjeM9+xOXkdp3+KC Mh0eMbgI92pS+V8giRfPK3NFpk2zOtnmQHmurb5O5fIFnUeX59s+UaTUpOtsnLHDU5 gDahwNPmpCA0ASioL89EdUSTwGD5AVZwXkuaE/YTKkvWtgBr24Jjk1Gjp0soSK0qtV LFrDgky450Pxw== 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 BA3A037820F5; Tue, 2 Apr 2024 15:48:54 +0000 (UTC) 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 Date: Tue, 2 Apr 2024 18:48:39 +0300 Message-Id: <20240402154842.508032-7-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240402154842.508032-1-eugen.hristev@collabora.com> References: <20240402154842.508032-1-eugen.hristev@collabora.com> MIME-Version: 1.0 X-Headers-End: 1rrgNs-00043w-P4 Subject: [f2fs-dev] [PATCH v15 6/9] ext4: Log error when lookup of encoded dentry fails X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Eugen Hristev via Linux-f2fs-devel From: Eugen Hristev Reply-To: Eugen Hristev Cc: krisman@suse.de, brauner@kernel.org, jack@suse.cz, linux-kernel@vger.kernel.org, eugen.hristev@collabora.com, viro@zeniv.linux.org.uk, kernel@collabora.com, Gabriel Krisman Bertazi Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net From: Gabriel Krisman Bertazi If the volume is in strict mode, ext4_ci_compare can report a broken encoding name. This will not trigger on a bad lookup, which is caught earlier, only if the actual disk name is bad. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Eugen Hristev --- fs/ext4/namei.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 2d0ee232fbe7..3268cf45d9db 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1477,6 +1477,9 @@ static bool ext4_match(struct inode *parent, * only case where it happens is on a disk * corruption or ENOMEM. */ + if (ret == -EINVAL) + EXT4_ERROR_INODE(parent, + "Directory contains filename that is invalid UTF-8"); return false; } return ret;