aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/bmap.h
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-07-13 10:33:54 -0400
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-07-22 21:02:14 -0400
commit5ad2686e9266f24a0bb76b01d5c3ae29b4e149fe (patch)
treedf7d1d37ec380e58b0b171db07c5d8a7f9bb4ff0 /fs/nilfs2/bmap.h
parent9b7b265c9ab67fcd1245d6b64fa5ca2eda43ac88 (diff)
nilfs2: get maximum number of child nodes from bmap object
The patch "reduce repetitive calculation of max number of child nodes" gathered up the calculation of maximum number of child nodes into nilfs_btree_nchildren_per_block() function. This makes the function get resultant value from a private variable in bmap object instead of calculating it for each call. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/bmap.h')
-rw-r--r--fs/nilfs2/bmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nilfs2/bmap.h b/fs/nilfs2/bmap.h
index fae83cf9c009..a20569b19929 100644
--- a/fs/nilfs2/bmap.h
+++ b/fs/nilfs2/bmap.h
@@ -105,6 +105,7 @@ static inline int nilfs_bmap_is_new_ptr(unsigned long ptr)
105 * @b_last_allocated_ptr: last allocated ptr for data block 105 * @b_last_allocated_ptr: last allocated ptr for data block
106 * @b_ptr_type: pointer type 106 * @b_ptr_type: pointer type
107 * @b_state: state 107 * @b_state: state
108 * @b_nchildren_per_block: maximum number of child nodes for non-root nodes
108 */ 109 */
109struct nilfs_bmap { 110struct nilfs_bmap {
110 union { 111 union {
@@ -118,6 +119,7 @@ struct nilfs_bmap {
118 __u64 b_last_allocated_ptr; 119 __u64 b_last_allocated_ptr;
119 int b_ptr_type; 120 int b_ptr_type;
120 int b_state; 121 int b_state;
122 __u16 b_nchildren_per_block;
121}; 123};
122 124
123/* pointer type */ 125/* pointer type */