Imported reiserfsprogs-3.6.9

This commit is contained in:
Jeff Mahoney committed 2012-10-11 11:29:29 -04:00
1 parent 99c89460c3
commit cccefa4d84
86 files changed
+13393 -6954

No files matched your search

+10 -5
View File
@@ -1,6 +1,8 @@
/*
* Copyright 1996-2002 Hans Reiser
* Copyright 1996-2003 by Hans Reiser, licensing governed by
* reiserfsprogs/README
*/
#include "fsck.h"
@@ -50,7 +52,7 @@ void reiserfsck_insert_item (struct path * path, struct item_head * ih, const ch
static void free_unformatted_nodes (struct item_head * ih, struct buffer_head * bh)
{
__u32 * punfm = (__u32 *)B_I_PITEM (bh, ih);
int i;
unsigned int i;
for (i = 0; i < I_UNFM_NUM (ih); i ++, punfm ++)
if (*punfm != 0) {
@@ -67,7 +69,6 @@ static void free_unformatted_nodes (struct item_head * ih, struct buffer_head *
}
}
void reiserfsck_delete_item (struct path * path, int temporary)
{
struct tree_balance tb;
@@ -201,7 +202,7 @@ static void erase (void)
}
void pass_through_tree (reiserfs_filsys_t * fs, do_after_read_t action1,
do_on_full_path_t action2)
do_on_full_path_t action2, int depth)
{
struct buffer_head * path[MAX_HEIGHT] = {0,};
int total[MAX_HEIGHT] = {0,};
@@ -227,7 +228,7 @@ void pass_through_tree (reiserfs_filsys_t * fs, do_after_read_t action1,
fsck_log ("%s: block %lu specified in badblock list found in tree, whole subtree skipped\n",
__FUNCTION__, block);
fsck_data (fs)->check.bad_nodes++;
one_more_corruption (fs, fatal);
one_more_corruption (fs, FATAL);
if (h == 0) {
brelse (path[h]);
@@ -256,6 +257,10 @@ void pass_through_tree (reiserfs_filsys_t * fs, do_after_read_t action1,
}
}
/* Time to stop. */
if (h == depth)
problem ++;
if (problem || is_leaf_node (path[h])) {
if (!problem && action2)
action2 (fs, path, h);