2020-02-28 10:53:05

by Murphy Zhou

[permalink] [raw]
Subject: ENOSPC inline_data fsck failure

Hi,

With inline_data mkfs option, generic/083 can easily trigger
a fsck failure like this:

-------------------------
seed = 1583104156
_check_generic_filesystem: filesystem on /dev/loop1 is inconsistent
*** fsck.ext4 output ***
fsck 1.46-WIP (09-Oct-2019)
e2fsck 1.46-WIP (09-Oct-2019)
Pass 1: Checking inodes, blocks, and sizes
Inode 94 extent tree (at level 1) could be shorter. Optimize? no
...
Pass 2: Checking directory structure
Entry 'c6b' in /p2/d6/d100 (32920) has an incorrect filetype (was 3,
should be 1).
Fix? no
Entry 'ca4' in /pa/d0/d4/d34/d26/dde (75) has an incorrect filetype (was
3, should be 1).
Fix? no
...
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Inode 107 ref count is 2, should be 1. Fix? no
Unattached inode 119
Connect to /lost+found? no
...
-------------------------

The testcase is doing a simple testing: make a small(256M) fs,
run fsstress in it, make it out of space. Then fsck.

Not sure about is this an issue of ext4 filesystem or e2fsck
needs more options.

Thanks!

--
Murphy


2020-02-29 18:38:50

by Theodore Ts'o

[permalink] [raw]
Subject: Re: ENOSPC inline_data fsck failure

On Fri, Feb 28, 2020 at 06:52:34PM +0800, Murphy Zhou wrote:
>
> With inline_data mkfs option, generic/083 can easily trigger
> a fsck failure like this:
>
> The testcase is doing a simple testing: make a small(256M) fs,
> run fsstress in it, make it out of space. Then fsck.
>
> Not sure about is this an issue of ext4 filesystem or e2fsck
> needs more options.

This is an ext4 bug. It's been on my radar screen to investigate one
of these days, but I've just never gotten around to it. I'm guessing
the bug is the error handling case when an inline directory is getting
converted directory where its contents are stored in data blocks, and
the block allocation fails due to the ENOSPC.

- Ted

2020-03-02 07:04:48

by Murphy Zhou

[permalink] [raw]
Subject: Re: ENOSPC inline_data fsck failure

On Sat, Feb 29, 2020 at 01:17:11PM -0500, Theodore Y. Ts'o wrote:
> On Fri, Feb 28, 2020 at 06:52:34PM +0800, Murphy Zhou wrote:
> >
> > With inline_data mkfs option, generic/083 can easily trigger
> > a fsck failure like this:
> >
> > The testcase is doing a simple testing: make a small(256M) fs,
> > run fsstress in it, make it out of space. Then fsck.
> >
> > Not sure about is this an issue of ext4 filesystem or e2fsck
> > needs more options.
>
> This is an ext4 bug. It's been on my radar screen to investigate one
> of these days, but I've just never gotten around to it. I'm guessing
> the bug is the error handling case when an inline directory is getting
> converted directory where its contents are stored in data blocks, and
> the block allocation fails due to the ENOSPC.
>
> - Ted

Thanks Ted for the confirmation!

--
Murphy