[Ocfs2-commits] mfasheh commits r1513 - branches/dlm-changes/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Sep 29 18:59:59 CDT 2004


Author: mfasheh
Date: 2004-09-29 18:59:58 -0500 (Wed, 29 Sep 2004)
New Revision: 1513

Modified:
   branches/dlm-changes/src/alloc.h
Log:
* a little documentation on how we calculate required metadata.



Modified: branches/dlm-changes/src/alloc.h
===================================================================
--- branches/dlm-changes/src/alloc.h	2004-09-29 23:03:44 UTC (rev 1512)
+++ branches/dlm-changes/src/alloc.h	2004-09-29 23:59:58 UTC (rev 1513)
@@ -96,6 +96,14 @@
 /* how many new metadata chunks would an allocation need at maximum? */
 static inline int ocfs2_extend_meta_needed(ocfs2_dinode *fe)
 {
+	/*
+	 * Rather than do all the work of determining how much we need
+	 * (involves a ton of reads and locks), just ask for the
+	 * maximal limit.  That's a tree depth shift.  So, one block for
+	 * level of the tree (current l_tree_depth), one block for the
+	 * new tree_depth==0 extent_block, and one block at the new
+	 * top-of-the tree.
+	 */
 	return(fe->id2.i_list.l_tree_depth + 2);
 }
 #endif /* OCFS2_ALLOC_H */



More information about the Ocfs2-commits mailing list