Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
fix_node.c File Reference
#include <linux/time.h>
#include <linux/slab.h>
#include <linux/string.h>
#include "reiserfs.h"
#include <linux/buffer_head.h>

Go to the source code of this file.

Macros

#define SET_PAR_SHIFT_LEFT
 
#define SET_PAR_SHIFT_RIGHT
 
#define LEFT_PARENTS   'l'
 
#define RIGHT_PARENTS   'r'
 
#define FLOW   1
 
#define NO_FLOW   0 /* do not any splitting */
 
#define NOTHING_SHIFT_NO_FLOW   0
 
#define NOTHING_SHIFT_FLOW   5
 
#define LEFT_SHIFT_NO_FLOW   10
 
#define LEFT_SHIFT_FLOW   15
 
#define RIGHT_SHIFT_NO_FLOW   20
 
#define RIGHT_SHIFT_FLOW   25
 
#define LR_SHIFT_NO_FLOW   30
 
#define LR_SHIFT_FLOW   35
 
#define MIN_NAME_LEN   1
 

Functions

int fix_nodes (int op_mode, struct tree_balance *tb, struct item_head *ins_ih, const void *data)
 
void unfix_nodes (struct tree_balance *tb)
 

Macro Definition Documentation

#define FLOW   1
#define LEFT_PARENTS   'l'

Definition at line 938 of file fix_node.c.

#define LEFT_SHIFT_FLOW   15
#define LEFT_SHIFT_NO_FLOW   10
#define LR_SHIFT_FLOW   35
#define LR_SHIFT_NO_FLOW   30
#define MIN_NAME_LEN   1
#define NO_FLOW   0 /* do not any splitting */
#define NOTHING_SHIFT_FLOW   5
#define NOTHING_SHIFT_NO_FLOW   0
#define RIGHT_PARENTS   'r'

Definition at line 939 of file fix_node.c.

#define RIGHT_SHIFT_FLOW   25
#define RIGHT_SHIFT_NO_FLOW   20
#define SET_PAR_SHIFT_LEFT
Value:
if (h)\
{\
int to_l;\
\
to_l = (MAX_NR_KEY(Sh)+1 - lpar + vn->vn_nr_item + 1) / 2 -\
(MAX_NR_KEY(Sh) + 1 - lpar);\
\
set_parameters (tb, h, to_l, 0, lnver, NULL, -1, -1);\
}\
else \
{\
if (lset==LEFT_SHIFT_FLOW)\
set_parameters (tb, h, lpar, 0, lnver, snum012+lset,\
tb->lbytes, -1);\
else\
set_parameters (tb, h, lpar - (tb->lbytes!=-1), 0, lnver, snum012+lset,\
-1, -1);\
}

Definition at line 711 of file fix_node.c.

#define SET_PAR_SHIFT_RIGHT
Value:
if (h)\
{\
int to_r;\
\
to_r = (MAX_NR_KEY(Sh)+1 - rpar + vn->vn_nr_item + 1) / 2 - (MAX_NR_KEY(Sh) + 1 - rpar);\
\
set_parameters (tb, h, 0, to_r, rnver, NULL, -1, -1);\
}\
else \
{\
if (rset==RIGHT_SHIFT_FLOW)\
set_parameters (tb, h, 0, rpar, rnver, snum012+rset,\
-1, tb->rbytes);\
else\
set_parameters (tb, h, 0, rpar - (tb->rbytes!=-1), rnver, snum012+rset,\
-1, -1);\
}

Definition at line 731 of file fix_node.c.

Function Documentation

int fix_nodes ( int  op_mode,
struct tree_balance tb,
struct item_head ins_ih,
const void data 
)

Definition at line 2330 of file fix_node.c.

void unfix_nodes ( struct tree_balance tb)

Definition at line 2551 of file fix_node.c.