Message ID | 20240220085235.71132-7-eugen.hristev@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-72617-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp271507dyc; Tue, 20 Feb 2024 00:57:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVj6K9kdrSacrhwUCoYeeeev7pMVexVUOchGuXiPK85DP1ahIVGkUkYzNqultZXdoJ+39vuS38gWYaDPawBdeI82WmuLw== X-Google-Smtp-Source: AGHT+IHC4BW9sPCXgRNXnTWQCbH8pPqHcxmvI3nNI5PbMtF+iCMVoIu3Gj/q/ae0UNNJ4FNgWFuA X-Received: by 2002:a19:ae08:0:b0:512:b257:29c0 with SMTP id f8-20020a19ae08000000b00512b25729c0mr3568048lfc.36.1708419469478; Tue, 20 Feb 2024 00:57:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708419469; cv=pass; d=google.com; s=arc-20160816; b=q+VEZTUn8kOyXc7QloHOrNZ1dCeOYEnUKZ5xaQv596QRi+uU31nkVvwq/MrGNep0Vd rZzv3C0YQmgZUfroU3TIGlRjmUpaZIKQ5AVsD7Eg+l+tW+3WlJo9yDquuRZQxRvTf9sa U05puDJ6lE0l/oqyXKEFLxnkHZ94qGToo4yi8LnHt4pAFrvrWYqiVCV7uAUNLQo4Uqn0 eReEaFH8KZ5FyEOTPx/biV6Kaing3TBuD/Fy5E/ZnNmT1WIl5q89YEnf06QmenLc5Ubo xBWukv/FS2d1m49QkG2FpDpo3FyIKGp0MzyLo/MGxVxzwa5KE/vlXZsvLxlNnMmGIEFz 9OfA== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=a10dU96oUgbeeU2HILozQQtbAHEtwkt6EHOQl3WO/6M=; fh=YX4HbHS7wMJfdu6Xp+2MgHIyDiEardnLcvtWgzaTy/w=; b=LckC5lRoEafZctHwBUzKfIcZnmIP4eIxHMsRDjLQtqx3S+s6cTjy9r/XxDWUlBsHyT vnk1xkhKk8l8zQDiB9OjVOzsR0b+o6C3JFQ/AiRyccKcVqDNE4Gcg/Vd8ZYLPdFDufK1 iZSYpb2TSphWRZtaqF17TmAiL9exMnmSM5Eb1e0WLdCqP2Nl1ZJEECTgIalzQMcVX/iV 661u41IoZ2VeubUer1S1+a9vSpm8qKcVuofV1ic34w8tdV7vCp08pzMHvi4ZECHo8XXB pysxcptEf3D2nJMPMbaSG9qsnlKRw00h5gV70WuV8wnkN3hDdTT3E+3D9EinDWxiSPn5 TVpw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=rRouZNa9; 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-72617-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72617-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id e15-20020a056402190f00b00563de7615c5si3212523edz.624.2024.02.20.00.57.49 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 00:57:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72617-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=rRouZNa9; 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-72617-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72617-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0AE1F1F2112F for <ouuuleilei@gmail.com>; Tue, 20 Feb 2024 08:57:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF5B6664A3; Tue, 20 Feb 2024 08:53:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="rRouZNa9" 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 D3A6465BA4; Tue, 20 Feb 2024 08:53:14 +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=1708419196; cv=none; b=CStBGqDjgkYAsna8ICHEIMOYhXVDUlOfPCaVf4YnMC3ulaavNoHWY+fRt0PTBObPGZkap98M0z+auEUU/+cBfhv7pGBRSHH/6B+D/zmJccgBnf3sONz9Wrc5TDkm5VM8JDjm1Kcb1xnWAxGYL1D60b/cUQb+uKC7TB78b4sIQNA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708419196; c=relaxed/simple; bh=cVITJNZ35p97HDzRx3PUv0ugSW5S2fLqOWH88XqFex0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rTufXpN8uUQ86qu2f21FEaReaPwxYTcBVqMYloQRRwqVE62XsFYQUgv851vNNiDe0JZXyZs6/9JkU3Ln6xddXtKdaISqatdA9zUtMCJeG2/4khnTLvG2Yi8diLHEaaaed3Qn4ZokKmwJ/9o4xK+wCC/yZVyboIguPDiGhtY7PPk= 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=rRouZNa9; 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=1708419193; bh=cVITJNZ35p97HDzRx3PUv0ugSW5S2fLqOWH88XqFex0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rRouZNa9WuyH+2RWTe+Ze9yMxCMI9N+ShmaKvWeh1NHyPiBFohuYsrp+BI4Y6rKXS xAcOVr9u4APwRw6P4xazTNUOPOyAtfIp4B7+sK7HWRPOQpc0dmNOBkY8Ztz9yAXWpL VfjzHrBO/dV9kMLqB33qT0087G4pEIFNvt0taSd/9jKL5SlfMXN1LC+6WghW+aafcd 7QklPcIE0D5RO382XXp8LIto0Nstgeb76lCTZbox6qyIAzRORRj6vhIT+gufCgyFpd JtnFhcAhuamsP4C7FtX4TGoO41pQ28M8AYWPdDZWXBQQXLpfQ2YXJyTvyEGZBLTXZV YnTEWxSd64Sfw== 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 925723782098; Tue, 20 Feb 2024 08:53:09 +0000 (UTC) From: Eugen Hristev <eugen.hristev@collabora.com> 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, Gabriel Krisman Bertazi <krisman@collabora.com>, Eric Biggers <ebiggers@google.com> Subject: [PATCH v12 6/8] ext4: Log error when lookup of encoded dentry fails Date: Tue, 20 Feb 2024 10:52:33 +0200 Message-Id: <20240220085235.71132-7-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240220085235.71132-1-eugen.hristev@collabora.com> References: <20240220085235.71132-1-eugen.hristev@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791407653880571194 X-GMAIL-MSGID: 1791407653880571194 |
Series |
Cache insensitive cleanup for ext4/f2fs
|
|
Commit Message
Eugen Hristev
Feb. 20, 2024, 8:52 a.m. UTC
From: Gabriel Krisman Bertazi <krisman@collabora.com> 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. Reviewed-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com> Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com> --- fs/ext4/namei.c | 3 +++ 1 file changed, 3 insertions(+)
Comments
Eugen Hristev <eugen.hristev@collabora.com> writes: > From: Gabriel Krisman Bertazi <krisman@collabora.com> > > 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. > > Reviewed-by: Eric Biggers <ebiggers@google.com> > Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com> > Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com> > --- > fs/ext4/namei.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c > index 6e7af8dc4dde..7d357c417475 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; Can you add a patch doing the same for f2fs?
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 6e7af8dc4dde..7d357c417475 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;