Lines Matching refs:nchildren
107 nilfs_btree_node_set_nchildren(struct nilfs_btree_node *node, int nchildren) in nilfs_btree_node_set_nchildren() argument
109 node->bn_nchildren = cpu_to_le16(nchildren); in nilfs_btree_node_set_nchildren()
163 int level, int nchildren, int ncmax, in nilfs_btree_node_init() argument
172 nilfs_btree_node_set_nchildren(node, nchildren); in nilfs_btree_node_init()
176 for (i = 0; i < nchildren; i++) { in nilfs_btree_node_init()
244 int nchildren; in nilfs_btree_node_insert() local
248 nchildren = nilfs_btree_node_get_nchildren(node); in nilfs_btree_node_insert()
249 if (index < nchildren) { in nilfs_btree_node_insert()
251 (nchildren - index) * sizeof(*dkeys)); in nilfs_btree_node_insert()
253 (nchildren - index) * sizeof(*dptrs)); in nilfs_btree_node_insert()
257 nchildren++; in nilfs_btree_node_insert()
258 nilfs_btree_node_set_nchildren(node, nchildren); in nilfs_btree_node_insert()
269 int nchildren; in nilfs_btree_node_delete() local
275 nchildren = nilfs_btree_node_get_nchildren(node); in nilfs_btree_node_delete()
281 if (index < nchildren - 1) { in nilfs_btree_node_delete()
283 (nchildren - index - 1) * sizeof(*dkeys)); in nilfs_btree_node_delete()
285 (nchildren - index - 1) * sizeof(*dptrs)); in nilfs_btree_node_delete()
287 nchildren--; in nilfs_btree_node_delete()
288 nilfs_btree_node_set_nchildren(node, nchildren); in nilfs_btree_node_delete()
343 int level, flags, nchildren; in nilfs_btree_node_broken() local
348 nchildren = nilfs_btree_node_get_nchildren(node); in nilfs_btree_node_broken()
353 nchildren < 0 || in nilfs_btree_node_broken()
354 nchildren > NILFS_BTREE_NODE_NCHILDREN_MAX(size))) { in nilfs_btree_node_broken()
358 flags, nchildren); in nilfs_btree_node_broken()
374 int level, flags, nchildren; in nilfs_btree_root_broken() local
379 nchildren = nilfs_btree_node_get_nchildren(node); in nilfs_btree_root_broken()
383 nchildren < 0 || in nilfs_btree_root_broken()
384 nchildren > NILFS_BTREE_ROOT_NCHILDREN_MAX)) { in nilfs_btree_root_broken()
387 inode->i_ino, level, flags, nchildren); in nilfs_btree_root_broken()
840 int nchildren, lnchildren, n, move, ncblk; in nilfs_btree_carry_left() local
844 nchildren = nilfs_btree_node_get_nchildren(node); in nilfs_btree_carry_left()
849 n = (nchildren + lnchildren + 1) / 2 - lnchildren; in nilfs_btree_carry_left()
886 int nchildren, rnchildren, n, move, ncblk; in nilfs_btree_carry_right() local
890 nchildren = nilfs_btree_node_get_nchildren(node); in nilfs_btree_carry_right()
895 n = (nchildren + rnchildren + 1) / 2 - rnchildren; in nilfs_btree_carry_right()
896 if (n > nchildren - path[level].bp_index) { in nilfs_btree_carry_right()
933 int nchildren, n, move, ncblk; in nilfs_btree_split() local
937 nchildren = nilfs_btree_node_get_nchildren(node); in nilfs_btree_split()
941 n = (nchildren + 1) / 2; in nilfs_btree_split()
942 if (n > nchildren - path[level].bp_index) { in nilfs_btree_split()
1288 int nchildren, lnchildren, n, ncblk; in nilfs_btree_borrow_left() local
1294 nchildren = nilfs_btree_node_get_nchildren(node); in nilfs_btree_borrow_left()
1298 n = (nchildren + lnchildren) / 2 - nchildren; in nilfs_btree_borrow_left()
1320 int nchildren, rnchildren, n, ncblk; in nilfs_btree_borrow_right() local
1326 nchildren = nilfs_btree_node_get_nchildren(node); in nilfs_btree_borrow_right()
1330 n = (nchildren + rnchildren) / 2 - nchildren; in nilfs_btree_borrow_right()
1653 int nchildren, ret; in nilfs_btree_check_delete() local
1662 nchildren = nilfs_btree_node_get_nchildren(root); in nilfs_btree_check_delete()
1663 if (nchildren > 1) in nilfs_btree_check_delete()
1665 ptr = nilfs_btree_node_get_ptr(root, nchildren - 1, in nilfs_btree_check_delete()
1676 nchildren = nilfs_btree_node_get_nchildren(node); in nilfs_btree_check_delete()
1677 maxkey = nilfs_btree_node_get_key(node, nchildren - 1); in nilfs_btree_check_delete()
1678 nextmaxkey = (nchildren > 1) ? in nilfs_btree_check_delete()
1679 nilfs_btree_node_get_key(node, nchildren - 2) : 0; in nilfs_btree_check_delete()
1693 int nchildren, ncmax, i, ret; in nilfs_btree_gather_data() local
1703 nchildren = nilfs_btree_node_get_nchildren(root); in nilfs_btree_gather_data()
1704 WARN_ON(nchildren > 1); in nilfs_btree_gather_data()
1705 ptr = nilfs_btree_node_get_ptr(root, nchildren - 1, in nilfs_btree_gather_data()
1718 nchildren = nilfs_btree_node_get_nchildren(node); in nilfs_btree_gather_data()
1719 if (nchildren < nitems) in nilfs_btree_gather_data()
1720 nitems = nchildren; in nilfs_btree_gather_data()