Lines Matching full:depth
25 * Maximum quota tree depth we support. Only to limit recursion when working
32 static int __get_index(struct qtree_mem_dqinfo *info, qid_t id, int depth) in __get_index() argument
36 depth = info->dqi_qtree_depth - depth - 1; in __get_index()
37 while (depth--) in __get_index()
42 static int get_index(struct qtree_mem_dqinfo *info, struct kqid qid, int depth) in get_index() argument
46 return __get_index(info, id, depth); in get_index()
336 uint *blks, int depth) in do_insert_tree() argument
346 if (!blks[depth]) { in do_insert_tree()
350 for (i = 0; i < depth; i++) in do_insert_tree()
358 blks[depth] = ret; in do_insert_tree()
362 ret = read_blk(info, blks[depth], buf); in do_insert_tree()
365 "block %u", blks[depth]); in do_insert_tree()
370 newblk = le32_to_cpu(ref[get_index(info, dquot->dq_id, depth)]); in do_insert_tree()
378 for (i = 0; i <= depth; i++) in do_insert_tree()
382 blks[depth], in do_insert_tree()
383 get_index(info, dquot->dq_id, depth)); in do_insert_tree()
388 blks[depth + 1] = newblk; in do_insert_tree()
389 if (depth == info->dqi_qtree_depth - 1) { in do_insert_tree()
395 dquot->dq_id, depth)])); in do_insert_tree()
400 blks[depth + 1] = find_free_dqentry(info, dquot, &ret); in do_insert_tree()
402 ret = do_insert_tree(info, dquot, blks, depth + 1); in do_insert_tree()
405 ref[get_index(info, dquot->dq_id, depth)] = in do_insert_tree()
406 cpu_to_le32(blks[depth + 1]); in do_insert_tree()
407 ret = write_blk(info, blks[depth], buf); in do_insert_tree()
409 put_free_dqblk(info, buf, blks[depth]); in do_insert_tree()
429 quota_error(dquot->dq_sb, "Quota tree depth too big!"); in dq_insert_tree()
545 uint *blks, int depth) in remove_tree() argument
555 ret = read_blk(info, blks[depth], buf); in remove_tree()
558 blks[depth]); in remove_tree()
561 newblk = le32_to_cpu(ref[get_index(info, dquot->dq_id, depth)]); in remove_tree()
567 for (i = 0; i <= depth; i++) in remove_tree()
571 blks[depth], in remove_tree()
572 get_index(info, dquot->dq_id, depth)); in remove_tree()
576 if (depth == info->dqi_qtree_depth - 1) { in remove_tree()
578 blks[depth + 1] = 0; in remove_tree()
580 blks[depth + 1] = newblk; in remove_tree()
581 ret = remove_tree(info, dquot, blks, depth + 1); in remove_tree()
583 if (ret >= 0 && !blks[depth + 1]) { in remove_tree()
584 ref[get_index(info, dquot->dq_id, depth)] = cpu_to_le32(0); in remove_tree()
590 && blks[depth] != QT_TREEOFF) { in remove_tree()
591 put_free_dqblk(info, buf, blks[depth]); in remove_tree()
592 blks[depth] = 0; in remove_tree()
594 ret = write_blk(info, blks[depth], buf); in remove_tree()
598 blks[depth]); in remove_tree()
614 quota_error(dquot->dq_sb, "Quota tree depth too big!"); in qtree_delete_dquot()
661 struct dquot *dquot, uint *blks, int depth) in find_tree_dqentry() argument
671 ret = read_blk(info, blks[depth], buf); in find_tree_dqentry()
674 blks[depth]); in find_tree_dqentry()
678 blk = le32_to_cpu(ref[get_index(info, dquot->dq_id, depth)]); in find_tree_dqentry()
687 for (i = 0; i <= depth; i++) in find_tree_dqentry()
691 blks[depth], in find_tree_dqentry()
692 get_index(info, dquot->dq_id, depth)); in find_tree_dqentry()
696 blks[depth + 1] = blk; in find_tree_dqentry()
697 if (depth < info->dqi_qtree_depth - 1) in find_tree_dqentry()
698 ret = find_tree_dqentry(info, dquot, blks, depth + 1); in find_tree_dqentry()
713 quota_error(dquot->dq_sb, "Quota tree depth too big!"); in find_dqentry()
793 unsigned int blk, int depth) in find_next_id() argument
805 for (i = depth; i < info->dqi_qtree_depth - 1; i++) in find_next_id()
814 for (i = __get_index(info, *id, depth); i < epb; i++) { in find_next_id()
825 if (depth == info->dqi_qtree_depth - 1) { in find_next_id()
829 ret = find_next_id(info, id, blk_no, depth + 1); in find_next_id()