[Ocfs2-tools-devel] libocfs2 allocation of clusters and fsck

Joel Becker Joel.Becker at oracle.com
Thu Oct 28 12:46:53 CDT 2004


On Thu, Oct 28, 2004 at 10:30:29AM -0700, Zach Brown wrote:
> >  The alternative is to read every chain
> > into memory and generate a flat bitmap like ext2fs does.
> 
> Is this just an optimization to avoid reads if there are lots of
> allocations?  If so, it seems like something that can wait until we have
>  basic correctness worked out.  Aren't these allocations going to be
> wildly infrequent?

	It's not really an optimization (the library doing allocation is
probably pretty rare).  Its a convenience.  I can read everything into
an ocfs2_bitmap type and then just use it.  Then I can just write out
the changes at the end.  Plus, you can then use my ocfs2_bitmap type as
something to compare against your fsck-generated map.
	If I go step-by-step, I can either

o Have no in-memory bitmap type (an ocfs2_bitmap).  Just flat out
  read/alloc/write/free.
o Try to populate an ocfs2_bitmap on the fly as needed.  That is, if you
  ask for bit 1000, read as many chains as I can until I find the one
  that matches bit 1000.

Joel


-- 

Life's Little Instruction Book #407

	"Every once in a while, take the scenic route."

Joel Becker
Senior Member of Technical Staff
Oracle Corporation
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-tools-devel mailing list