[Ocfs-tools-commits] mfasheh commits r112 - in trunk/ocfs2: debugfs.ocfs2 mkfs.ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Mon Jun 28 20:54:41 CDT 2004


Author: mfasheh
Date: 2004-06-28 19:54:39 -0500 (Mon, 28 Jun 2004)
New Revision: 112

Modified:
   trunk/ocfs2/debugfs.ocfs2/dump.c
   trunk/ocfs2/debugfs.ocfs2/readfs.c
   trunk/ocfs2/mkfs.ocfs2/mkfs2.c
   trunk/ocfs2/mkfs.ocfs2/readdir.c
Log:
* updates to ocfs-tools to format / debug with tree_depth starting at zero.



Modified: trunk/ocfs2/debugfs.ocfs2/dump.c
===================================================================
--- trunk/ocfs2/debugfs.ocfs2/dump.c	2004-06-28 23:38:05 UTC (rev 111)
+++ trunk/ocfs2/debugfs.ocfs2/dump.c	2004-06-29 00:54:39 UTC (rev 112)
@@ -215,7 +215,7 @@
 	ocfs2_extent_rec *rec;
 	int i;
 
-	printf("Tree Depth: %d   Count: %u   Next Free Rec: %u\n",
+	printf("Tree Depth: %u   Count: %u   Next Free Rec: %u\n",
 	       ext->l_tree_depth, ext->l_count, ext->l_next_free_rec);
 
 	if (!ext->l_next_free_rec)

Modified: trunk/ocfs2/debugfs.ocfs2/readfs.c
===================================================================
--- trunk/ocfs2/debugfs.ocfs2/readfs.c	2004-06-28 23:38:05 UTC (rev 111)
+++ trunk/ocfs2/debugfs.ocfs2/readfs.c	2004-06-29 00:54:39 UTC (rev 112)
@@ -138,7 +138,7 @@
 
 	for (i = 0; i < ext->l_next_free_rec; ++i) {
 		rec = &(ext->l_recs[i]);
-		if (ext->l_tree_depth == -1)
+		if (ext->l_tree_depth == 0)
 			add_extent_rec (arr, rec);
 		else {
 			buflen = 1 << blksz_bits;

Modified: trunk/ocfs2/mkfs.ocfs2/mkfs2.c
===================================================================
--- trunk/ocfs2/mkfs.ocfs2/mkfs2.c	2004-06-28 23:38:05 UTC (rev 111)
+++ trunk/ocfs2/mkfs.ocfs2/mkfs2.c	2004-06-29 00:54:39 UTC (rev 112)
@@ -650,7 +650,7 @@
 
 	di->id2.i_list.l_count = cpu_to_le16(ocfs2_extent_recs_per_inode(blocksize));
 	di->id2.i_list.l_next_free_rec = cpu_to_le16(0);
-	di->id2.i_list.l_tree_depth = cpu_to_le16(-1);
+	di->id2.i_list.l_tree_depth = cpu_to_le16(0);
 
 	if (rec->extent_len) {
 		di->id2.i_list.l_next_free_rec = cpu_to_le16(1);

Modified: trunk/ocfs2/mkfs.ocfs2/readdir.c
===================================================================
--- trunk/ocfs2/mkfs.ocfs2/readdir.c	2004-06-28 23:38:05 UTC (rev 111)
+++ trunk/ocfs2/mkfs.ocfs2/readdir.c	2004-06-29 00:54:39 UTC (rev 112)
@@ -156,7 +156,7 @@
 	bleh->alloc_size = fe->i_clusters * 4096;
 	bleh->total_size = 0;
 	
-	if (fe->id2.i_list.l_tree_depth == -1)
+	if (fe->id2.i_list.l_tree_depth == 0)
 		ret = load_local_extents(fd, bleh, fe);
 	else
 		ret = -1;
@@ -231,7 +231,7 @@
 	printf("dtime: %s", ctime(&fe->i_dtime));
 	printf("blkno: %llu\n", fe->i_blkno);
 	printf("clusters: %lu\n", fe->i_clusters);
-	printf("tree_depth: %d\n", fe->id2.i_list.l_tree_depth);
+	printf("tree_depth: %u\n", fe->id2.i_list.l_tree_depth);
 	printf("next_free_ext: %u\n", fe->id2.i_list.l_next_free_rec);
 	printf("extent count: %u\n", fe->id2.i_list.l_count);
 	//printf("last_ext_ptr: %llu\n", fe->last_ext_ptr);



More information about the Ocfs-tools-commits mailing list