Files
linux/fs
Ryusuke Konishi 9b7b265c9a nilfs2: reduce repetitive calculation of max number of child nodes
The current btree implementation repeats the same calculation on the
maximum number of child nodes.  This is because a few low level
routines use the calculation for index addressing in a btree node
block.

This reduces the calculation by explicitly passing the maximum number
of child nodes (ncmax) through their argument.

This changes parameter passing of the following functions:

 - nilfs_btree_node_dptrs
 - nilfs_btree_node_get_ptr
 - nilfs_btree_node_set_ptr
 - nilfs_btree_node_init
 - nilfs_btree_node_move_left
 - nilfs_btree_node_move_right
 - nilfs_btree_node_insert
 - nilfs_btree_node_delete, and
 - nilfs_btree_get_node

The following functions are removed:

 - nilfs_btree_node_nchildren_min
 - nilfs_btree_node_nchildren_max

Most middle level btree operations are rewritten to pass a proper
ncmax value depending on whether each occurrence of node is "root" or
not.

A constant NILFS_BTREE_ROOT_NCHILDREN_MAX is used for the root node,
whereas nilfs_btree_nchildren_per_block() function is used for
non-root nodes.  If a node could be either root or a non-root node, an
output argument of nilfs_btree_get_node() is used to set up ncmax.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
2010-07-23 10:02:14 +09:00
..
2010-05-27 22:05:02 -04:00
2010-05-27 09:12:41 -07:00
…
2010-05-19 22:41:57 -04:00
2010-04-30 14:52:51 -05:00
…
…
2010-06-04 17:16:30 -04:00
…
2010-05-27 22:15:33 -04:00
…
2010-05-27 22:15:33 -04:00
2010-05-21 18:31:16 -04:00
…
2010-05-11 17:43:58 +02:00
…
…
2010-05-21 18:31:16 -04:00
…
…
…
2010-05-21 18:31:17 -04:00
…
2010-05-18 08:57:00 +10:00
…
2010-05-21 18:31:17 -04:00
2010-06-10 19:08:34 +02:00
…
…
2010-05-27 09:12:56 -07:00
…
…
…
…
2010-05-21 18:31:17 -04:00
2010-06-29 10:38:22 -07:00
2010-06-01 12:42:12 +02:00
…