On Thu 06-02-20 08:49:44, Jan Kara wrote: > On Wed 05-02-20 11:04:23, Andreas Dilger wrote: > > On Feb 5, 2020, at 10:30 AM, Jan Kara <jack@xxxxxxx> wrote: > > > DIR_INDEX is not enabled. This is harsh but it should be very rare (it > > > means someone disabled DIR_INDEX on existing filesystem and didn't run > > > e2fsck), e2fsck can fix the problem, and we don't want to answer the > > > difficult question: "Should we rather corrupt the directory more or > > > should we ignore that DIR_INDEX feature is not set?" > > > > Wouldn't it be better to continue allowing the directory to be read, but > > not modified? Otherwise, essentially, metadata_csum is making the > > filesystem _less_ robust rather than making it more robust. We don't > > _need_ the htree index to do a lookup in the directory. > > Hum, I was somewhat afraid it may be a bit fragile but thinking about it > now, there aren't that many places that need to check. OK, I will try to do > this and see how it looks. When I actually implemented this and started testing, I found out why I didn't want to do it this way :) - the directories are not readable anyway because checksums are failing for block 0 (which used to be htree root node). And I'd rather not pile up further hacks in the kernel trying to work around this. As I wrote in the changelog, chances of anyone hitting this in practice are rather low and e2fsck can do the right thing... Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR