From: "Theodore Ts'o" <tytso@mit.edu>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
linux-ext4 <linux-ext4@vger.kernel.org>,
Li Dongyang <dongyangli@ddn.com>
Subject: Re: fsck doesn't seem to understand inline directories
Date: Wed, 12 Jun 2019 21:50:56 -0400 [thread overview]
Message-ID: <20190613015056.GA2956@mit.edu> (raw)
In-Reply-To: <044ADDD7-D7C0-4E27-B9E7-E576CDEDD1C4@dilger.ca>
On Wed, Jun 12, 2019 at 02:40:18PM -0600, Andreas Dilger wrote:
> On Jun 12, 2019, at 8:07 AM, Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote:
> >
> > Doing a forced check on an ext4 file system with inline_data results in
> > lots of warnings - and I think answering yes to "fixing" those would
> > actually corrupt the fs.
>
> Rasmus,
> This definitely seems like a bug in e2fsck. It isn't totally surprising, since
> the inline_data feature is not widely used. We are currently investigating using
> it for regular files, but it doesn't seem worthwhile for directories to me.
It looks like the problem is the combination of large_dir and
inline_data, and it does look like the problem is in e2fsck (as
opposed to the kernel).
Large_dir is a new feature (even newer than inline_data, and it looks
like the support for large_dir didn't handle the combination with
inline_data correctly).
- Ted
# mke2fs -t ext4 -O inline_data -Fq /tmp/ext4.img 1G
/tmp/ext4.img contains a ext4 file system
last mounted on Wed Jun 12 21:47:25 2019
# mount /tmp/ext4.img /mnt ; mkdir /mnt/aa ; umount /mnt
# e2fsck -fn /tmp/ext4.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
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/tmp/ext4.img: 12/65536 files (0.0% non-contiguous), 12954/262144 blocks
### So everything is fine with just inline_data, but when you
### enable the large_dir features, and rerun e2fsck....
# debugfs -w -R "features large_dir" /tmp/ext4.img
debugfs 1.45.2 (27-May-2019)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg large_dir inline_data sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
# e2fsck -fn /tmp/ext4.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
/tmp/ext4.img: ********** WARNING: Filesystem still has errors **********
/tmp/ext4.img: 12/65536 files (0.0% non-contiguous), 12954/262144 blocks
next prev parent reply other threads:[~2019-06-13 16:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-12 14:07 fsck doesn't seem to understand inline directories Rasmus Villemoes
2019-06-12 20:40 ` Andreas Dilger
2019-06-13 1:50 ` Theodore Ts'o [this message]
2019-06-13 2:22 ` Andreas Dilger
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=20190613015056.GA2956@mit.edu \
--to=tytso@mit.edu \
--cc=adilger@dilger.ca \
--cc=dongyangli@ddn.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox