linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Gabriel Krisman Bertazi <krisman@collabora.com>
To: tytso@mit.edu, adilger.kernel@dilger.ca, jaegeuk@kernel.org,
	ebiggers@kernel.org
Cc: linux-ext4@vger.kernel.org,
	Gabriel Krisman Bertazi <krisman@collabora.com>,
	kernel@collabora.com, Eric Biggers <ebiggers@google.com>,
	linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH v8 6/8] ext4: Log error when lookup of encoded dentry fails
Date: Thu, 19 May 2022 17:23:57 -0400	[thread overview]
Message-ID: <20220519212359.19442-7-krisman@collabora.com> (raw)
In-Reply-To: <20220519212359.19442-1-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>

---

changes since v4:
  - Reword error message (Eric)

Changes since v1:
  - reword error message "file in directory" -> "filename" (Eric)
---
 fs/ext4/namei.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index eaf383740965..708c241b23ec 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1406,6 +1406,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;
-- 
2.36.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  parent reply	other threads:[~2022-05-19 21:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 21:23 [f2fs-dev] [PATCH v8 0/8] Clean up the case-insensitive lookup path Gabriel Krisman Bertazi
2022-05-19 21:23 ` [f2fs-dev] [PATCH v8 1/8] ext4: Simplify the handling of cached insensitive names Gabriel Krisman Bertazi
2022-05-19 21:23 ` [f2fs-dev] [PATCH v8 2/8] f2fs: " Gabriel Krisman Bertazi
2022-05-19 21:23 ` [f2fs-dev] [PATCH v8 3/8] libfs: Introduce case-insensitive string comparison helper Gabriel Krisman Bertazi
2022-05-19 21:23 ` [f2fs-dev] [PATCH v8 4/8] ext4: Reuse generic_ci_match for ci comparisons Gabriel Krisman Bertazi
2022-05-19 21:23 ` [f2fs-dev] [PATCH v8 5/8] f2fs: " Gabriel Krisman Bertazi
2022-05-19 21:23 ` Gabriel Krisman Bertazi [this message]
2022-05-19 21:23 ` [f2fs-dev] [PATCH v8 7/8] ext4: Move CONFIG_UNICODE defguards into the code flow Gabriel Krisman Bertazi
2022-05-19 21:23 ` [f2fs-dev] [PATCH v8 8/8] f2fs: " Gabriel Krisman Bertazi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220519212359.19442-7-krisman@collabora.com \
    --to=krisman@collabora.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=ebiggers@google.com \
    --cc=ebiggers@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=kernel@collabora.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).