[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200316093048.GD12783@quack2.suse.cz>
Date: Mon, 16 Mar 2020 10:30:48 +0100
From: Jan Kara <jack@...e.cz>
To: "Theodore Y. Ts'o" <tytso@....edu>
Cc: Jan Kara <jack@...e.cz>, linux-ext4@...r.kernel.org
Subject: Re: [PATCH 2/7] e2fsck: Fix indexed dir rehash failure with
metadata_csum enabled
On Sat 07-03-20 18:17:19, Theodore Y. Ts'o wrote:
> 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.
Aha! I was wondering what's going on with those strange inline
statements...
> 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.
Thanks for fixing this!
Honza
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists