/* We continue the while loop if another process snatches our found
* free block from us after we find it but before we successfully
- * mark it as in use, or if we need to use sync to free up some
- * blocks on the preserve list. */
+ * mark it as in use */
while (amount_needed--) {
/* skip over any blocknrs already gotten last time. */
@@ -412,19 +411,19 @@ free_and_return:
return CARRY_ON;
}
-// this is called only by get_empty_nodes with for_preserve_list==0
+// this is called only by get_empty_nodes
int reiserfs_new_blocknrs (struct reiserfs_transaction_handle *th, unsigned long * free_blocknrs,
unsigned long search_start, int amount_needed) {
- return do_reiserfs_new_blocknrs(th, free_blocknrs, search_start, amount_needed, 0/*for_preserve_list-priority*/, 0/*for_formatted*/, 0/*for_prealloc */) ;
+ return do_reiserfs_new_blocknrs(th, free_blocknrs, search_start, amount_needed, 0/*priority*/, 0/*for_formatted*/, 0/*for_prealloc */) ;
}
-// called by get_new_buffer and by reiserfs_get_block with amount_needed == 1 and for_preserve_list == 0
+// called by get_new_buffer and by reiserfs_get_block with amount_needed == 1
int reiserfs_new_unf_blocknrs(struct reiserfs_transaction_handle *th, unsigned long * free_blocknrs,
unsigned long search_start) {
return do_reiserfs_new_blocknrs(th, free_blocknrs, search_start,
1/*amount_needed*/,
- 0/*for_preserve_list-priority*/,
+ 0/*priority*/,
1/*for formatted*/,
0/*for prealloc */) ;
}
diff -rup linux-2.4.7-ac1/fs/reiserfs/do_balan.c linux-2.4.7-ac1.patched/fs/reiserfs/do_balan.c
--- linux-2.4.7-ac1/fs/reiserfs/do_balan.c Fri Jul 27 22:47:05 2001
+++ linux-2.4.7-ac1.patched/fs/reiserfs/do_balan.c Fri Jul 27 23:27:12 2001
@@ -215,10 +215,6 @@ static int balance_leaf_when_delete (str
leaf_move_items (LEAF_FROM_S_TO_L, tb, n, -1, 0);
leaf_move_items (LEAF_FROM_R_TO_L, tb, B_NR_ITEMS(tb->R[0]), -1, 0);
return 0;
@@ -284,9 +268,6 @@ static int balance_leaf_when_delete (str
if ( tb->rnum[0] == -1 ) {
/* all contents of R[0] and S[0] will be in R[0] */
leaf_shift_right(tb, n, -1);
-#if 0/*preserve list*/
- preserve_invalidate(tb, tbS0, tb->R[0]);
-#endif
reiserfs_invalidate_buffer (tb, tbS0);
return 0;
}
@@ -310,10 +291,6 @@ static int balance_leaf (struct tree_bal
)
{
struct buffer_head * tbS0 = PATH_PLAST_BUFFER (tb->tb_path);
-#if 0/*preserve list*/
- struct buffer_head * tbF0 = PATH_H_PPARENT (tb->tb_path, 0);
- int S0_b_item_order = PATH_H_B_ITEM_ORDER (tb->tb_path, 0);
-#endif
int item_pos = PATH_LAST_POSITION (tb->tb_path); /* index into the array of item headers in S[0]
of the affected item */
struct buffer_info bi;
@@ -369,15 +346,6 @@ static int balance_leaf (struct tree_bal
RFALSE( !is_direct_le_ih (ih),
"PAP-12075: only direct inserted item can be broken. %h", ih);
ret_val = leaf_shift_left (tb, tb->lnum[0]-1, -1);
- /* when reading the if conditions preceding the subsequent preserve_shifted
- lines understand that their goal is to determine if all that we are
- shifting is the new data being added */
-#if 0/*preserve list*/
- if (tb->lnum[0] - 1 > 0) {
- preserve_shifted(tb, &(PATH_PLAST_BUFFER (tb->tb_path)), tbF0, S0_b_item_order, tb->L[0]);
- tbS0 = PATH_PLAST_BUFFER (tb->tb_path);
- }
-#endif
/* If we insert new item in the begin of R[0] change the right delimiting key */
if ( item_pos - n + tb->rnum[0] - 1 == 0 ) {
@@ -748,10 +660,6 @@ static int balance_leaf (struct tree_bal
else /* new item or part of it doesn't fall into R[0] */
{
leaf_shift_right(tb,tb->rnum[0],tb->rbytes);
-#if 0/*preserve list*/
- preserve_shifted(tb, &(PATH_PLAST_BUFFER (tb->tb_path)), tbF0, S0_b_item_order, tb->R[0]);
- tbS0 = PATH_PLAST_BUFFER (tb->tb_path);
-#endif
}
break;
@@ -779,13 +687,6 @@ static int balance_leaf (struct tree_bal
tb->rbytes, entry_count);
/* Shift rnum[0]-1 items in whole. Shift rbytes-1 directory entries from directory item number rnum[0] */
leaf_shift_right(tb,tb->rnum[0],tb->rbytes - 1);
-#if 0/*preserve list*/
- /* if we are shifting more than just the new entry */
- if (tb->rbytes > 1 || tb->rnum[0] > 1) {
- preserve_shifted(tb, &(PATH_PLAST_BUFFER (tb->tb_path)), tbF0, S0_b_item_order, tb->R[0]);
- tbS0 = PATH_PLAST_BUFFER (tb->tb_path);
- }
-#endif
/* Paste given directory entry to directory item */
paste_entry_position = pos_in_item - entry_count + tb->rbytes - 1;
bi.tb = tb;
@@ -815,10 +716,6 @@ static int balance_leaf (struct tree_bal
else /* new directory entry doesn't fall into R[0] */
{
leaf_shift_right(tb,tb->rnum[0],tb->rbytes);
-#if 0/*preserve list*/
- preserve_shifted(tb, &(PATH_PLAST_BUFFER (tb->tb_path)), tbF0, S0_b_item_order, tb->R[0]);
- tbS0 = PATH_PLAST_BUFFER (tb->tb_path);
-#endif
}
}
else /* regular object */
@@ -835,13 +732,6 @@ static int balance_leaf (struct tree_bal
pos_in_item, B_N_PITEM_HEAD(tbS0,item_pos)->ih_item_len);
leaf_shift_right(tb,tb->rnum[0],n_shift);
-#if 0/*preserve list*/
- /* if we are shifting an old part from the appended item or more than the appended item is going into R */
- if (n_shift || tb->rnum[0] > 1) {
- preserve_shifted(tb, &(PATH_PLAST_BUFFER (tb->tb_path)), tbF0, S0_b_item_order, tb->R[0]);
- tbS0 = PATH_PLAST_BUFFER (tb->tb_path);
- }
-#endif
/* Calculate number of bytes which must remain in body after appending to R[0] */
if ( (n_rem = tb->insert_size[0] - tb->rbytes) < 0 )
n_rem = 0;
@@ -899,10 +789,6 @@ static int balance_leaf (struct tree_bal
struct item_head * pasted;
zeros_num = tb->insert_size[0] = 0;
}
@@ -1088,10 +955,6 @@ static int balance_leaf (struct tree_bal
else /* new item or it part don't falls into S_new[i] */
{
leaf_move_items (LEAF_FROM_S_TO_SNEW, tb, snum[i], sbytes[i], S_new[i]);
-#if 0/*preserve list*/
- preserve_shifted(tb, &(PATH_PLAST_BUFFER (tb->tb_path)), tbF0, S0_b_item_order, S_new[i]);
- tbS0 = PATH_PLAST_BUFFER (tb->tb_path);
-#endif
}
break;
@@ -1123,14 +986,6 @@ static int balance_leaf (struct tree_bal
/* Shift snum[i]-1 items in whole. Shift sbytes[i] directory entries from directory item number snum[i] */
leaf_move_items (LEAF_FROM_S_TO_SNEW, tb, snum[i], sbytes[i]-1, S_new[i]);
-#if 0/*preserve list*/
- /* if more than the affected item is shifted, or if more than
- one entry (from the affected item) is shifted */
- if (snum[i] > 1 || sbytes[i] > 1) {
- preserve_shifted(tb, &(PATH_PLAST_BUFFER (tb->tb_path)), tbF0, S0_b_item_order, S_new[i]);
- tbS0 = PATH_PLAST_BUFFER (tb->tb_path);
- }
-#endif
/* Paste given directory entry to directory item */
bi.tb = tb;
bi.bi_bh = S_new[i];
@@ -1219,11 +1074,6 @@ static int balance_leaf (struct tree_bal
#endif /* CONFIG_REISERFS_CHECK */
ret_val = leaf_move_items (LEAF_FROM_S_TO_SNEW, tb, snum[i], sbytes[i], S_new[i]);
-#if 0/*preserve list*/
- /* we must preserve that which we are pasting onto the end of and shifting */
- preserve_shifted(tb, &(PATH_PLAST_BUFFER (tb->tb_path)), tbF0, S0_b_item_order, S_new[i]);
- tbS0 = PATH_PLAST_BUFFER (tb->tb_path);
-#endif
RFALSE( ret_val,
"PAP-12240: unexpected value returned by leaf_move_items (%d)",
@@ -1255,10 +1105,6 @@ static int balance_leaf (struct tree_bal
else /* pasted item doesn't fall into S_new[i] */
{
leaf_move_items (LEAF_FROM_S_TO_SNEW, tb, snum[i], sbytes[i], S_new[i]);
-#if 0/*preserve list*/
- preserve_shifted(tb, &(PATH_PLAST_BUFFER (tb->tb_path)), tbF0, S0_b_item_order, S_new[i]);
- tbS0 = PATH_PLAST_BUFFER (tb->tb_path);
-#endif
}
break;
default: /* cases d and t */
@@ -1297,11 +1143,6 @@ static int balance_leaf (struct tree_bal
bi.bi_parent = PATH_H_PPARENT (tb->tb_path, 0);
bi.bi_position = PATH_H_POSITION (tb->tb_path, 1);
leaf_insert_into_buf (&bi, item_pos, ih, body, zeros_num);
-#if 0/*preserve list*/
- if (tb->preserve_mode == PRESERVE_INDIRECT_TO_DIRECT){
- mark_suspected_recipient (tb->tb_sb, bi.bi_bh);
- }
-#endif
/* If we insert the first key change the delimiting key */
if( item_pos == 0 ) {
Only in linux-2.4.7-ac1.patched/fs/reiserfs: do_balan.c~
diff -rup linux-2.4.7-ac1/fs/reiserfs/prints.c linux-2.4.7-ac1.patched/fs/reiserfs/prints.c
--- linux-2.4.7-ac1/fs/reiserfs/prints.c Fri Jul 27 23:04:17 2001
+++ linux-2.4.7-ac1.patched/fs/reiserfs/prints.c Fri Jul 27 23:25:31 2001
@@ -294,7 +294,7 @@ void reiserfs_debug (struct super_block
panics in reiserfs_fs.h have numbers from 1000 to 1999
super.c 2000 to 2999
- preserve.c 3000 to 3999
+ preserve.c (unused) 3000 to 3999
bitmap.c 4000 to 4999
stree.c 5000 to 5999
prints.c 6000 to 6999
@@ -699,9 +699,9 @@ void print_statistics (struct super_bloc
{
/*
- printk ("reiserfs_put_super: session statistics: balances %d, fix_nodes %d, preserve list freeings %d, \
+ printk ("reiserfs_put_super: session statistics: balances %d, fix_nodes %d, \
bmap with search %d, without %d, dir2ind %d, ind2dir %d\n",
- s->u.reiserfs_sb.s_do_balance, s->u.reiserfs_sb.s_fix_nodes, s->u.reiserfs_sb.s_preserve_list_freeings,
+ s->u.reiserfs_sb.s_do_balance, s->u.reiserfs_sb.s_fix_nodes,
s->u.reiserfs_sb.s_bmaps, s->u.reiserfs_sb.s_bmaps_without_search,
s->u.reiserfs_sb.s_direct2indirect, s->u.reiserfs_sb.s_indirect2direct);
*/
diff -rup linux-2.4.7-ac1/fs/reiserfs/super.c linux-2.4.7-ac1.patched/fs/reiserfs/super.c
--- linux-2.4.7-ac1/fs/reiserfs/super.c Fri Jul 27 22:47:05 2001
+++ linux-2.4.7-ac1.patched/fs/reiserfs/super.c Fri Jul 27 23:25:31 2001
@@ -83,9 +83,6 @@ void reiserfs_unlockfs(struct super_bloc
// at the ext2 code and comparing. It's subfunctions contain no code
// used as a template unless they are so labeled.
//
-/* there should be no suspected recipients already. True and cautious
- bitmaps should not differ. We only have to free preserve list and
- write both bitmaps */
void reiserfs_put_super (struct super_block * s)
{
int i;