remarkable-linux/fs/nilfs2
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
..
alloc.c nilfs2: add kernel doc comments to persistent object allocator functions 2010-05-10 11:32:31 +09:00
alloc.h nilfs2: add kernel doc comments to persistent object allocator functions 2010-05-10 11:32:31 +09:00
bmap.c nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
bmap.h nilfs2: unify bmap set_target_v operations 2010-07-23 10:02:14 +09:00
btnode.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
btnode.h
btree.c nilfs2: reduce repetitive calculation of max number of child nodes 2010-07-23 10:02:14 +09:00
btree.h nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
cpfile.c nilfs2: trivial coding style fix 2009-12-25 13:01:50 +09:00
cpfile.h
dat.c nilfs2: fix various typos in comments 2010-03-14 10:29:51 +09:00
dat.h
dir.c nilfs2: fix typo "cout" -> "count" in error message 2010-03-14 10:29:50 +09:00
direct.c nilfs2: remove redundant pointer checks in bmap lookup functions 2010-07-23 10:02:14 +09:00
direct.h nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
file.c drop unused dentry argument to ->fsync 2010-05-27 22:05:02 -04:00
gcdat.c
gcinode.c nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
ifile.c
ifile.h
inode.c nilfs2: replace inode uid,gid,mode initialization with helper function 2010-05-21 18:31:25 -04:00
ioctl.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2 2010-04-12 18:34:25 -07:00
Kconfig
Makefile
mdt.c nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
mdt.h
namei.c nilfs really shouldn't slap struct dentry on stack... 2010-03-03 14:07:58 -05:00
nilfs.h nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
page.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
page.h
recovery.c nilfs2: add missing error code in comment of nilfs_search_super_root 2010-07-23 10:02:11 +09:00
sb.h
segbuf.c nilfs2: insert checkpoint number in segment summary header 2010-05-10 11:32:31 +09:00
segbuf.h nilfs2: get rid of macros for segment summary information 2010-07-23 10:02:09 +09:00
segment.c nilfs2: do not update log cursor for small change 2010-07-23 10:02:11 +09:00
segment.h nilfs2: rename nilfs_recover_logical_segments function 2010-07-23 10:02:09 +09:00
sufile.c nilfs2: fix various typos in comments 2010-03-14 10:29:51 +09:00
sufile.h
super.c nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
the_nilfs.c nilfs2: do not update log cursor for small change 2010-07-23 10:02:11 +09:00
the_nilfs.h nilfs2: do not update log cursor for small change 2010-07-23 10:02:11 +09:00