On Wed, Mar 30, 2011 at 03:45:02PM -0500, Amit Kulkarni wrote:
> Hi,
>
> In fsck_ffs's pass1.c it just takes forever for large sized partitions
> and also if you have very high number of files stored on that
> partition (used inodes count goes high).
>
> fsck main limitation is in pass1.c.
>
> In pass1.c I found out that it in fact proceeded to check all inodes,
> but there's a misleading comment there, which says, "Find all
> allocated blocks". So the original intent was to check only used
> inodes in that code block but somebody deleted that part of code when
> compared to FreeBSD. Is there any special reason not to build a used
> inode list, then only go through it as FreeBSD does? I know they added
> some stuff in the last year but that part of code has existed for a
> long time and we don't have it. Why not?
>
> I was reading cvs ver 1.46 of pass1.c in FreeBSD.
>
> Thanks
AFAIK, we never had that optimization.
It is interesting because it really speeds up fsck_ffs for filesystems
with few used inodes.
There's also a dangerous part: it assumes the cylinder group summary
info is ok when softdeps has been used.
I suppose that's the reason why it was never included into OpenBSD.
I'll ponder if I want to work on this.
-Otto