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