From 5ad2686e9266f24a0bb76b01d5c3ae29b4e149fe Mon Sep 17 00:00:00 2001 From: Ryusuke Konishi Date: Tue, 13 Jul 2010 23:33:54 +0900 Subject: 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 --- fs/nilfs2/bmap.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/nilfs2/bmap.h') 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) * @b_last_allocated_ptr: last allocated ptr for data block * @b_ptr_type: pointer type * @b_state: state + * @b_nchildren_per_block: maximum number of child nodes for non-root nodes */ struct nilfs_bmap { union { @@ -118,6 +119,7 @@ struct nilfs_bmap { __u64 b_last_allocated_ptr; int b_ptr_type; int b_state; + __u16 b_nchildren_per_block; }; /* pointer type */ -- cgit v1.2.3