aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/reiserfs.h
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2014-04-23 10:00:46 -0400
committerJan Kara <jack@suse.cz>2014-05-07 12:31:06 -0400
commitb49fb112d4ae62ca1c549130a111fb39e85e2c93 (patch)
tree7560fef7e8a15e04994d83867b8bc409cc256d06 /fs/reiserfs/reiserfs.h
parent97fd4b97a947dc9d11dee1bbcceca7a124df9e4e (diff)
reiserfs: balance_leaf refactor, move state variables into tree_balance
This patch pushes the rest of the state variables in balance_leaf into the tree_balance structure so we can use them when we split balance_leaf into separate functions. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/reiserfs/reiserfs.h')
-rw-r--r--fs/reiserfs/reiserfs.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/fs/reiserfs/reiserfs.h b/fs/reiserfs/reiserfs.h
index 40bb5cebab65..bf53888c7f59 100644
--- a/fs/reiserfs/reiserfs.h
+++ b/fs/reiserfs/reiserfs.h
@@ -2471,12 +2471,6 @@ struct tree_balance {
2471 /* number of items that fall into left most node when S[0] splits */ 2471 /* number of items that fall into left most node when S[0] splits */
2472 int s0num; 2472 int s0num;
2473 2473
2474 /* number of items that fall into first new node when S[0] splits */
2475 int s1num;
2476
2477 /* number of items that fall into second new node when S[0] splits */
2478 int s2num;
2479
2480 /* 2474 /*
2481 * number of bytes which can flow to the left neighbor from the left 2475 * number of bytes which can flow to the left neighbor from the left
2482 * most liquid item that cannot be shifted from S[0] entirely 2476 * most liquid item that cannot be shifted from S[0] entirely
@@ -2491,12 +2485,30 @@ struct tree_balance {
2491 */ 2485 */
2492 int rbytes; 2486 int rbytes;
2493 2487
2488
2489 /*
2490 * index into the array of item headers in
2491 * S[0] of the affected item
2492 */
2493 int item_pos;
2494
2495 /* new nodes allocated to hold what could not fit into S */
2496 struct buffer_head *S_new[2];
2497
2498 /*
2499 * number of items that will be placed into nodes in S_new
2500 * when S[0] splits
2501 */
2502 int snum[2];
2503
2494 /* 2504 /*
2495 * number of bytes which flow to the first new node when S[0] splits 2505 * number of bytes which flow to nodes in S_new when S[0] splits
2496 * note: if S[0] splits into 3 nodes, then items do not need to be cut 2506 * note: if S[0] splits into 3 nodes, then items do not need to be cut
2497 */ 2507 */
2498 int s1bytes; 2508 int sbytes[2];
2499 int s2bytes; 2509
2510 int pos_in_item;
2511 int zeroes_num;
2500 2512
2501 /* 2513 /*
2502 * buffers which are to be freed after do_balance finishes 2514 * buffers which are to be freed after do_balance finishes