• Home
  • Raw
  • Download

Lines Matching full:blk

59 static ssize_t read_blk(struct qtree_mem_dqinfo *info, uint blk, char *buf)  in read_blk()  argument
65 info->dqi_usable_bs, (loff_t)blk << info->dqi_blocksize_bits); in read_blk()
68 static ssize_t write_blk(struct qtree_mem_dqinfo *info, uint blk, char *buf) in write_blk() argument
74 info->dqi_usable_bs, (loff_t)blk << info->dqi_blocksize_bits); in write_blk()
117 int ret, blk; in get_free_dqblk() local
122 blk = info->dqi_free_blk; in get_free_dqblk()
123 ret = read_blk(info, blk, buf); in get_free_dqblk()
137 blk = info->dqi_blocks++; in get_free_dqblk()
140 ret = blk; in get_free_dqblk()
147 static int put_free_dqblk(struct qtree_mem_dqinfo *info, char *buf, uint blk) in put_free_dqblk() argument
155 err = write_blk(info, blk, buf); in put_free_dqblk()
158 info->dqi_free_blk = blk; in put_free_dqblk()
165 uint blk) in remove_free_dqentry() argument
201 if (write_blk(info, blk, buf) < 0) in remove_free_dqentry()
203 "with free entries", blk); in remove_free_dqentry()
212 uint blk) in insert_free_dqentry() argument
222 err = write_blk(info, blk, buf); in insert_free_dqentry()
230 cpu_to_le32(blk); in insert_free_dqentry()
236 info->dqi_free_entry = blk; in insert_free_dqentry()
260 uint blk, i; in find_free_dqentry() local
272 blk = info->dqi_free_entry; in find_free_dqentry()
273 *err = read_blk(info, blk, buf); in find_free_dqentry()
280 blk = get_free_dqblk(info); in find_free_dqentry()
281 if ((int)blk < 0) { in find_free_dqentry()
282 *err = blk; in find_free_dqentry()
289 info->dqi_free_entry = blk; in find_free_dqentry()
294 *err = remove_free_dqentry(info, buf, blk); in find_free_dqentry()
297 "from entry free list", blk); in find_free_dqentry()
316 *err = write_blk(info, blk, buf); in find_free_dqentry()
319 blk); in find_free_dqentry()
322 dquot->dq_off = ((loff_t)blk << info->dqi_blocksize_bits) + in find_free_dqentry()
326 return blk; in find_free_dqentry()
449 uint blk) in free_dqentry() argument
457 if (dquot->dq_off >> info->dqi_blocksize_bits != blk) { in free_dqentry()
459 "other block (%u) than it should (%u)", blk, in free_dqentry()
464 ret = read_blk(info, blk, buf); in free_dqentry()
467 blk); in free_dqentry()
476 ret = remove_free_dqentry(info, buf, blk); in free_dqentry()
478 ret = put_free_dqblk(info, buf, blk); in free_dqentry()
481 "(%u) to free list", blk); in free_dqentry()
491 ret = insert_free_dqentry(info, buf, blk); in free_dqentry()
494 "data block (%u) to free entry list", blk); in free_dqentry()
498 ret = write_blk(info, blk, buf); in free_dqentry()
501 "data block %u", blk); in free_dqentry()
514 uint *blk, int depth) in remove_tree() argument
523 ret = read_blk(info, *blk, buf); in remove_tree()
526 *blk); in remove_tree()
551 && *blk != QT_TREEOFF) { in remove_tree()
552 put_free_dqblk(info, buf, *blk); in remove_tree()
553 *blk = 0; in remove_tree()
555 ret = write_blk(info, *blk, buf); in remove_tree()
559 *blk); in remove_tree()
580 struct dquot *dquot, uint blk) in find_block_dqentry() argument
589 ret = read_blk(info, blk, buf); in find_block_dqentry()
592 "block %u", blk); in find_block_dqentry()
608 ret = ((loff_t)blk << info->dqi_blocksize_bits) + sizeof(struct in find_block_dqentry()
618 struct dquot *dquot, uint blk, int depth) in find_tree_dqentry() argument
626 ret = read_blk(info, blk, buf); in find_tree_dqentry()
629 blk); in find_tree_dqentry()
633 blk = le32_to_cpu(ref[get_index(info, dquot->dq_id, depth)]); in find_tree_dqentry()
634 if (!blk) /* No reference? */ in find_tree_dqentry()
636 if (blk < QT_TREEOFF || blk >= info->dqi_blocks) { in find_tree_dqentry()
638 blk, info->dqi_blocks); in find_tree_dqentry()
644 ret = find_tree_dqentry(info, dquot, blk, depth+1); in find_tree_dqentry()
646 ret = find_block_dqentry(info, dquot, blk); in find_tree_dqentry()
733 unsigned int blk, int depth) in find_next_id() argument
748 ret = read_blk(info, blk, buf); in find_next_id()
751 "Can't read quota tree block %u", blk); in find_next_id()