From: Artem Blagodarenko <artem.blagodarenko@gmail.com>
To: linux-ext4@vger.kernel.org
Cc: adilger.kernel@dilger.ca, linux@rasmusvillemoes.dk
Subject: [PATCH] e2fsck: process empty directory if large_dir and inline_data set
Date: Fri, 14 Jun 2019 17:42:37 +0300 [thread overview]
Message-ID: <20190614144237.6010-1-c17828@cray.com> (raw)
Doing a forced check on an ext4 file system with inline_data and
large_dir results in lots of fsck messages. To reproduce:
truncate -s 100000000 ext4.img
misc/mke2fs -t ext4 -I 512 -O 'inline_data,large_dir' ext4.img
mkdir m
sudo mount ext4.img m
mkdir m/aa
sudo umount m
e2fsck/e2fsck -f -n ext4.img
The last command gives this output:
[root@localhost e2fsprogs-kernel]# e2fsck/e2fsck -f -n ext4-2.img
e2fsck 1.45.2 (27-May-2019)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
'..' in /aa (12) is <The NULL inode> (0), should be / (2).
Fix? no
Pass 4: Checking reference counts
Inode 2 ref count is 4, should be 3. Fix? no
Inode 12 ref count is 2, should be 1. Fix? no
Pass 5: Checking group summary information
ext4-2.img: ********** WARNING: Filesystem still has errors **********
ext4-2.img: 12/24384 files (0.0% non-contiguous), 17874/97656 blocks
Rootcause of this issue is large_dir optimization that is not
appropriate for inline_data.
Let's not optimize it if inline_data is set.
Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Artem Blagodarenko <c17828@cray.com>
---
e2fsck/pass2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c
index a7d9c47d..8b40e93d 100644
--- a/e2fsck/pass2.c
+++ b/e2fsck/pass2.c
@@ -980,7 +980,8 @@ static int check_dir_block(ext2_filsys fs,
* very large and then the files are deleted. For now, all that is
* needed is to avoid e2fsck filling in these holes as part of
* feature flag. */
- if (db->blk == 0 && ext2fs_has_feature_largedir(fs->super))
+ if (db->blk == 0 && ext2fs_has_feature_largedir(fs->super) &&
+ !ext2fs_has_feature_inline_data(fs->super))
return 0;
if (db->blk == 0 && !inline_data_size) {
--
2.14.3
next reply other threads:[~2019-06-14 14:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-14 14:42 Artem Blagodarenko [this message]
2019-06-19 19:00 ` [PATCH] e2fsck: process empty directory if large_dir and inline_data set Theodore Ts'o
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=20190614144237.6010-1-c17828@cray.com \
--to=artem.blagodarenko@gmail.com \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.