[lkml]   [2001]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Ext2-devel] ext2/ialloc.c cleanup

On Wed, 7 Nov 2001, Andreas Dilger wrote:

> Minor nits, from my changes to this same function:
> 1) please replace use of "i" for best block group in find_cg_*, to
> something better like "group", just for clarity.

Consider that done.

> 2) in find_cg_*, when you fail the quadratic search, the linear search
> should skip groups that were previously checked in the quadratic search,
> with slight changes to both loops:

I'm not actually sure that it's a good thing. The different between the
sequences we do is that I do
n n+1 n+3 n+7 ... n+2 (linear)
and you do
n n+1 n+2 n+4 n+8 ... n+3 (linear)
which has slightly worse properties. You avoid duplicated check on n+3,
but lose a very nice property - shifting the old sequence is guaranteed
not to have many intersections with original in the beginning (distances
between elements do not repeat). With your sequence it's no longer true.

> 3) I know that "cylinder groups" were used in old FFS/whatever implementation,
> but all of the ext2 code/documentation refers to these as block groups.
> Can you stick with that for ext2 (e.g. gdp, not cg; bg_foo, not cg_foo)?

Ehh... Try to read that aloud. Maybe it's just me, but "gdp" sounds (and
looks) bad...

> 4) sbi can be gotten by "EXT2_SB(sb)".

True, consider that done.

Right now I'm doing alternative strategy for directory allocation, as soon
as I finish that I'll put the result on usual place.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:12    [W:0.108 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site