[Ocfs2-tools-commits] taoma commits r1330 -
branches/sparse-files/libocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue Mar 27 00:29:09 PDT 2007
Author: taoma
Date: 2007-03-27 00:29:06 -0700 (Tue, 27 Mar 2007)
New Revision: 1330
Modified:
branches/sparse-files/libocfs2/extend_file.c
branches/sparse-files/libocfs2/extent_map.c
Log:
Remove all the 'fprintf' in libocfs2.
Modified: branches/sparse-files/libocfs2/extend_file.c
===================================================================
--- branches/sparse-files/libocfs2/extend_file.c 2007-03-26 07:30:47 UTC (rev 1329)
+++ branches/sparse-files/libocfs2/extend_file.c 2007-03-27 07:29:06 UTC (rev 1330)
@@ -552,18 +552,12 @@
while(el->l_tree_depth > 1) {
if (el->l_next_free_rec == 0) {
- fprintf(stderr, "Dinode %"PRIu64" has empty "
- "extent list (next_free_rec == 0)",
- fe->i_blkno);
ret = OCFS2_ET_CORRUPT_EXTENT_BLOCK;
goto bail;
}
i = el->l_next_free_rec - 1;
blkno = el->l_recs[i].e_blkno;
if (!blkno) {
- fprintf(stderr,"Dinode %"PRIu64" has extent "
- "list where extent # %d has no physical "
- "block start", fe->i_blkno, i);
ret = OCFS2_ET_CORRUPT_EXTENT_BLOCK;
goto bail;
}
@@ -739,17 +733,8 @@
i++;
/* The caller didn't pass two adjacent paths. */
- if (i > left->p_tree_depth) {
- fprintf(stderr,
- "Inode %"PRIu64", "
- "left depth %u, right depth %u\n"
- "left leaf blk %"PRIu64", "
- "right leaf blk %"PRIu64"\n",
- path_root_blkno(right),
- left->p_tree_depth, right->p_tree_depth,
- path_leaf_blkno(left), path_leaf_blkno(right));
+ if (i > left->p_tree_depth)
assert(0);
- }
} while (left->p_node[i].blkno == right->p_node[i].blkno);
return i - 1;
@@ -780,9 +765,6 @@
el = root_el;
while (el->l_tree_depth) {
if (el->l_next_free_rec == 0) {
- fprintf(stderr,
- "Inode has empty extent list at depth %u\n",
- el->l_tree_depth);
ret = OCFS2_ET_CORRUPT_EXTENT_BLOCK;
goto out;
@@ -805,10 +787,6 @@
blkno = el->l_recs[i].e_blkno;
if (blkno == 0) {
- fprintf(stderr,
- "Inode has bad blkno in extent list "
- "at depth %u (index %d)\n",
- el->l_tree_depth, i);
ret = OCFS2_ET_CORRUPT_EXTENT_BLOCK;
goto out;
}
@@ -825,10 +803,6 @@
el = &eb->h_list;
if (el->l_next_free_rec > el->l_count) {
- fprintf(stderr,
- "Inode has bad count in extent list at "
- "block %"PRIu64" (next free=%u, count=%u)\n",
- blkno, el->l_next_free_rec, el->l_count);
ret = OCFS2_ET_CORRUPT_EXTENT_BLOCK;
goto out;
}
@@ -1122,13 +1096,8 @@
eb = (struct ocfs2_extent_block *)left_leaf_eb;
left_el = path_leaf_el(left_path);
- if (left_el->l_next_free_rec != left_el->l_count) {
- fprintf(stderr,"Inode %"PRIu64" has non-full interior leaf node"
- " %"PRIu64"(next free = %u)",
- path_root_blkno(left_path), eb->h_blkno,
- left_el->l_next_free_rec);
+ if (left_el->l_next_free_rec != left_el->l_count)
return OCFS2_ET_CORRUPT_EXTENT_BLOCK;
- }
/*
* This extent block may already have an empty record, so we
@@ -1227,8 +1196,6 @@
* If we got here, we never found a valid node where
* the tree indicated one should be.
*/
- fprintf(stderr, "Invalid extent tree at extent block"
- " %"PRIu64"\n", blkno);
ret = OCFS2_ET_CORRUPT_EXTENT_BLOCK;
goto out;
@@ -1337,16 +1304,8 @@
if (ret)
goto out;
- if (path_leaf_blkno(left_path) == path_leaf_blkno(right_path)) {
- fprintf(stderr, "Inode %"PRIu64": "
- "error during insert of %u "
- "(left path cpos %u) results in two identical "
- "paths ending at %"PRIu64"\n",
- path_root_blkno(left_path),
- insert_cpos, cpos,
- path_leaf_blkno(left_path));
+ if (path_leaf_blkno(left_path) == path_leaf_blkno(right_path))
assert(0);
- }
if (ocfs2_rotate_requires_path_adjustment(left_path,
insert_cpos)) {
Modified: branches/sparse-files/libocfs2/extent_map.c
===================================================================
--- branches/sparse-files/libocfs2/extent_map.c 2007-03-26 07:30:47 UTC (rev 1329)
+++ branches/sparse-files/libocfs2/extent_map.c 2007-03-27 07:29:06 UTC (rev 1330)
@@ -622,10 +622,6 @@
el = &eb->h_list;
if (el->l_tree_depth) {
- fprintf(stderr,
- "Inode %"PRIu64" has non zero tree depth in "
- "leaf block %"PRIu64"\n",
- di->i_blkno, eb->h_blkno);
ret = OCFS2_ET_CORRUPT_EXTENT_BLOCK;
goto out;
}
@@ -653,10 +649,6 @@
assert(v_cluster >= rec->e_cpos);
if (!rec->e_blkno) {
- fprintf(stderr, "Inode %"PRIu64" has bad extent "
- "record (%u, %u, 0)", di->i_blkno,
- rec->e_cpos,
- ocfs2_rec_clusters(el->l_tree_depth, rec));
ret = OCFS2_ET_BAD_BLKNO;
goto out;
}
More information about the Ocfs2-tools-commits
mailing list