Lines Matching refs:cur_block

383 	blk64_t offset = 0, cur_block;  in sparse_read_blk64()  local
391 cur_block = block_to_sparse_block(block, &offset, channel, sm); in sparse_read_blk64()
392 if (sm->blocks[cur_block]) in sparse_read_blk64()
393 memcpy(out, (sm->blocks[cur_block]) + offset, count); in sparse_read_blk64()
398 cur_block = block_to_sparse_block(block + i, &offset, in sparse_read_blk64()
400 if (sm->blocks[cur_block]) in sparse_read_blk64()
402 sm->blocks[cur_block] + offset, in sparse_read_blk64()
422 blk64_t offset = 0, cur_block; in sparse_write_blk64() local
431 cur_block = block_to_sparse_block(block, &offset, channel, in sparse_write_blk64()
433 if (!sm->blocks[cur_block]) { in sparse_write_blk64()
434 sm->blocks[cur_block] = calloc(1, sm->block_size); in sparse_write_blk64()
435 if (!sm->blocks[cur_block]) in sparse_write_blk64()
438 memcpy(sm->blocks[cur_block] + offset, in, count); in sparse_write_blk64()
443 cur_block = block_to_sparse_block(block + i, &offset, in sparse_write_blk64()
445 if (!sm->blocks[cur_block]) { in sparse_write_blk64()
446 sm->blocks[cur_block] = in sparse_write_blk64()
448 if (!sm->blocks[cur_block]) in sparse_write_blk64()
451 memcpy(sm->blocks[cur_block] + offset, in sparse_write_blk64()
468 blk64_t cur_block, offset; in sparse_discard() local
477 cur_block = block_to_sparse_block(blk + i, &offset, channel, in sparse_discard()
479 if (!sm->blocks[cur_block]) in sparse_discard()
481 free(sm->blocks[cur_block]); in sparse_discard()
482 sm->blocks[cur_block] = NULL; in sparse_discard()