[Ocfs2-tools-devel] libocfs2 allocation of clusters and fsck
Zach Brown
zach.brown at oracle.com
Thu Oct 28 18:03:05 CDT 2004
Joel Becker wrote:
> On Thu, Oct 28, 2004 at 10:58:28AM -0700, Zach Brown wrote:
>
>>Mmm, that last bit is compelling. Rather than comparing, though, it
>>seems we should just have fsck build up the bitmap as it scans and then
>>use the library to sync it back.
>
> Is that what ext2 does?
Yeah, sort of. In the passes it builds up the same data structure that
it reads the bitmaps into off of disk. check_block_bitmaps() compares
them and fixes things by freeing the one it read of disk and putting the
one it built up in its place.
> if (fixit == 1) {
> ext2fs_free_block_bitmap(fs->block_map);
> retval = ext2fs_copy_bitmap(ctx->block_found_map,
> &fs->block_map);
It eventually writes out that fs->block_map via the exit path in unix.c.
> To be fair, chains _are_ built for speedy lookup of bits, but
> not for speedy lookup of a particular group.
*nod*
- z
More information about the Ocfs2-tools-devel
mailing list