[Ocfs2-devel] [PATCH 0/2] Unwritten extent merge update, V2

Tao Ma tao.ma at oracle.com
Tue Jan 29 22:09:24 PST 2008


The old extent merging code down underneath "ocfs2_mark_extent_written()"
can't merge extents between leaf blocks. This patch resolve this.
So that a large unwritten extent which has been split up with a bunch of
writes can be merged together once all unwritten regions have been written to.

Modification from V1 to V2:
1. Add more comments for some functions which is more complicated than before.
2. move the journal_access() calls to a better place so that we may detect its
   error before we do the real modification to some extent blocks.
3. Using l_next_free_rec instead of l_count to index the extent record array so
   that it's more consistent with other codes.
4. Delete the empty extent block during ocfs2_merge_rec_left when it is needed
   instead of leaving it to ocfs2_rotate_tree_left.
5. Stick to one merge mechanism in CONTIG_LEFTRIGHT. Right merge is always the
   first instead of left one.



More information about the Ocfs2-devel mailing list