[Ocfs2-tools-commits] taoma commits r1308 - trunk/libocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Feb 23 00:54:49 PST 2007
Author: taoma
Date: 2007-02-23 00:54:46 -0800 (Fri, 23 Feb 2007)
New Revision: 1308
Modified:
trunk/libocfs2/extents.c
Log:
Fix the wrong value of i_last_eb_blk when doing fsck.ocfs2.
For more details, see
http://oss.oracle.com/bugzilla/show_bug.cgi?id=849
Signed-off-by: mfasheh
Modified: trunk/libocfs2/extents.c
===================================================================
--- trunk/libocfs2/extents.c 2007-02-16 18:10:50 UTC (rev 1307)
+++ trunk/libocfs2/extents.c 2007-02-23 08:54:46 UTC (rev 1308)
@@ -271,8 +271,16 @@
&el->l_recs[i]);
if (el->l_recs[i].e_clusters &&
- (el->l_recs[i].e_cpos >= ctxt->last_eb_cpos))
- ctxt->last_eb_blkno = el->l_recs[i].e_blkno;
+ (el->l_recs[i].e_cpos >= ctxt->last_eb_cpos)) {
+ /*
+ * Only set last_eb_blkno if current extent
+ * list point to leaf blocks.
+ */
+ if (el->l_tree_depth == 1)
+ ctxt->last_eb_blkno =
+ el->l_recs[i].e_blkno;
+ ctxt->last_eb_cpos = el->l_recs[i].e_cpos;
+ }
} else {
iret |= (*ctxt->func)(ctxt->fs, &el->l_recs[i],
@@ -300,7 +308,6 @@
return iret;
}
-/* XXX this needs to be fixed to update the last extent block stuff */
static int extent_iterate_eb(struct ocfs2_extent_rec *eb_rec,
int ref_tree_depth, uint64_t ref_blkno,
int ref_recno, struct extent_context *ctxt)
More information about the Ocfs2-tools-commits
mailing list