Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: pavel@denx.de (Pavel Machek)
Subject: [PATCH v7 08/24] erofs: add namei functions
Date: Tue, 13 Aug 2019 13:48:21 +0200	[thread overview]
Message-ID: <20190813114821.GB11559@amd> (raw)
In-Reply-To: <20190813091326.84652-9-gaoxiang25@huawei.com>

Hi!

> +	/*
> +	 * on-disk error, let's only BUG_ON in the debugging mode.
> +	 * otherwise, it will return 1 to just skip the invalid name
> +	 * and go on (in consideration of the lookup performance).
> +	 */
> +	DBG_BUGON(qd->name > qd->end);

I believe you should check for errors in non-debug mode, too.


> +			if (unlikely(!ndirents)) {
> +				DBG_BUGON(1);
> +				kunmap_atomic(de);
> +				put_page(page);
> +				page = ERR_PTR(-EIO);
> +				goto out;
> +			}

-EUCLEAN is right error code for corrupted filesystem. (And you
 probably want to print something to the syslog, too).

								Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/linux-erofs/attachments/20190813/b0bb8ba8/attachment.sig>

  reply	other threads:[~2019-08-13 11:48 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13  9:13 [PATCH v7 00/24] erofs: promote erofs from staging Gao Xiang
2019-08-13  9:13 ` [PATCH v7 01/24] erofs: add on-disk layout Gao Xiang
2019-08-13  9:13 ` [PATCH v7 02/24] erofs: add erofs in-memory stuffs Gao Xiang
2019-08-13  9:13 ` [PATCH v7 03/24] erofs: add super block operations Gao Xiang
2019-08-13  9:13 ` [PATCH v7 04/24] erofs: add raw address_space operations Gao Xiang
2019-08-13  9:13 ` [PATCH v7 05/24] erofs: add inode operations Gao Xiang
2019-08-13  9:13 ` [PATCH v7 06/24] erofs: support special inode Gao Xiang
2019-08-13  9:13 ` [PATCH v7 07/24] erofs: add directory operations Gao Xiang
2019-08-13  9:13 ` [PATCH v7 08/24] erofs: add namei functions Gao Xiang
2019-08-13 11:48   ` Pavel Machek [this message]
2019-08-13 12:23     ` Gao Xiang
2019-08-13 12:41       ` Gao Xiang
2019-08-15  7:01       ` Pavel Machek
2019-08-15  7:25         ` Gao Xiang
2019-08-13  9:13 ` [PATCH v7 09/24] erofs: support tracepoint Gao Xiang
2019-08-13  9:13 ` [PATCH v7 10/24] erofs: update Kconfig and Makefile Gao Xiang
2019-08-13  9:13 ` [PATCH v7 11/24] erofs: introduce xattr & posixacl support Gao Xiang
2019-08-13  9:13 ` [PATCH v7 12/24] erofs: introduce tagged pointer Gao Xiang
2019-08-13  9:13 ` [PATCH v7 13/24] erofs: add compression indexes support Gao Xiang
2019-08-13  9:13 ` [PATCH v7 14/24] erofs: introduce superblock registration Gao Xiang
2019-08-13  9:13 ` [PATCH v7 15/24] erofs: introduce erofs shrinker Gao Xiang
2019-08-13  9:13 ` [PATCH v7 16/24] erofs: introduce workstation for decompression Gao Xiang
2019-08-13  9:13 ` [PATCH v7 17/24] erofs: introduce per-CPU buffers implementation Gao Xiang
2019-08-13  9:13 ` [PATCH v7 18/24] erofs: introduce pagevec for decompression subsystem Gao Xiang
2019-08-13  9:13 ` [PATCH v7 19/24] erofs: add erofs_allocpage() Gao Xiang
2019-08-13  9:13 ` [PATCH v7 20/24] erofs: introduce generic decompression backend Gao Xiang
2019-08-13  9:13 ` [PATCH v7 21/24] erofs: introduce LZ4 decompression inplace Gao Xiang
2019-08-13  9:13 ` [PATCH v7 22/24] erofs: introduce the decompression frontend Gao Xiang
2019-08-13  9:13 ` [PATCH v7 23/24] erofs: introduce cached decompression Gao Xiang
2019-08-13  9:13 ` [PATCH v7 24/24] erofs: add document Gao Xiang

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=20190813114821.GB11559@amd \
    --to=pavel@denx.de \
    /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