[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200307231719.GE99899@mit.edu>
Date: Sat, 7 Mar 2020 18:17:19 -0500
From: "Theodore Y. Ts'o" <tytso@....edu>
To: Jan Kara <jack@...e.cz>
Cc: linux-ext4@...r.kernel.org
Subject: Re: [PATCH 2/7] e2fsck: Fix indexed dir rehash failure with
metadata_csum enabled
On Thu, Feb 13, 2020 at 11:15:57AM +0100, Jan Kara wrote:
> E2fsck directory rehashing code can fail with ENOSPC due to a bug in
> ext2fs_htree_intnode_maxrecs() which fails to take metadata checksum
> into account and thus e.g. e2fsck can decide to create 1 indirect level
> of index tree when two are actually needed. Fix the logic to account for
> metadata checksum.
>
> Signed-off-by: Jan Kara <jack@...e.cz>
Applied with a minor change; I didn't want to make this change:
> -_INLINE_ int ext2fs_htree_intnode_maxrecs(ext2_filsys fs, int blocks)
> +static inline int ext2fs_htree_intnode_maxrecs(ext2_filsys fs, int blocks)
... because it would make ext2fs_htree_intmode_maxrecs disappear from libext2fs.so.
So I changed this:
> + if (ext2fs_has_feature_metadata_csum(fs->super))
to this:
+ if ((EXT2_SB(fs->super)->s_feature_ro_compat &
+ EXT4_FEATURE_RO_COMPAT_METADATA_CSUM) != 0)
to fix the inline related compilation errors.
- Ted
Powered by blists - more mailing lists