Re: [PATCH][CFT] (updated) ext2 directories in pagecache

Daniel Phillips
2001-05-11T01:04:58Z

On Wednesday 09 May 2001 23:22, you wrote:
> Daniel writes [re index directories]:
> > This is lightly tested and apparently stable.
>
> I was looking at the new patch, and I saw something that puzzles me.
> Why do you set the EXT2_INDEX_FL on a new (empty) directory, rather
> than only setting it when the dx_root index is created?

This makes it follow the rule: new directories will be created with an
index. (Never mind that the index creation is deferred.) Now, if you
think it's ok to add an index to any directory that grows past one
block that's fine with me. I was looking for a little more predictable
behavriour.

A couple of lines of code will go away and the is_dx(dir) tests will
get a little faster if we just use 'dir grew past a block' as the rule.

> Setting the flag earlier than that makes it mostly useless, since it
> will be set on basically every directory. Not setting it would also
> make your is_dx() check simply a check for the EXT2_INDEX_FL bit (no
> need to also check size).

Yep.

> Also no need to set EXT2_COMPAT_DIR_INDEX until such a time that we
> have a (real) directory with an index, to avoid gratuitous
> incompatibility with e2fsck.
>
> Cheers, Andreas

Again yep, you decide, I will fix, or I see a few posts down you have
changed the patch, also fine.

--
Daniel