• Home
  • Raw
  • Download

Lines Matching refs:channel

17 			     io_channel *channel EXT2FS_ATTR((unused)))  in sparse_open()
21 static errcode_t sparse_close(io_channel channel EXT2FS_ATTR((unused))) in sparse_close()
47 io_channel channel; member
57 static errcode_t sparse_write_blk(io_channel channel, unsigned long block,
79 return sparse_write_blk(sm->channel, block, nr_blocks, data); in sparse_import_segment()
136 sm->channel = io; in io_manager_configure()
186 int flags, io_channel *channel) in sparse_open_channel() argument
194 *channel = io; in sparse_open_channel()
229 static errcode_t sparse_open(const char *name, int flags, io_channel *channel) in sparse_open() argument
238 retval = sparse_open_channel(&sparse_params, flags, channel); in sparse_open()
241 (*channel)->manager = sparse_io_manager; in sparse_open()
246 static errcode_t sparsefd_open(const char *name, int flags, io_channel *channel) in sparsefd_open() argument
255 retval = sparse_open_channel(&sparse_params, flags, channel); in sparsefd_open()
258 (*channel)->manager = sparsefd_io_manager; in sparsefd_open()
292 static errcode_t sparse_close_channel(io_channel channel) in sparse_close_channel() argument
296 struct sparse_map *sm = channel->private_data; in sparse_close_channel()
326 free(channel); in sparse_close_channel()
330 static errcode_t sparse_close(io_channel channel) in sparse_close() argument
333 struct sparse_map *sm = channel->private_data; in sparse_close()
336 retval = sparse_close_channel(channel); in sparse_close()
343 static errcode_t sparse_set_blksize(io_channel channel, int blksize) in sparse_set_blksize() argument
345 channel->block_size = blksize; in sparse_set_blksize()
350 io_channel channel, struct sparse_map *sm) in block_to_sparse_block() argument
355 ratio = sm->block_size / channel->block_size; in block_to_sparse_block()
357 *offset = (block % ratio) * channel->block_size; in block_to_sparse_block()
362 static errcode_t check_block_size(io_channel channel, struct sparse_map *sm) in check_block_size() argument
364 if (sm->block_size >= channel->block_size) in check_block_size()
369 static errcode_t sparse_read_blk64(io_channel channel, blk64_t block, in sparse_read_blk64() argument
375 struct sparse_map *sm = channel->private_data; in sparse_read_blk64()
377 if (check_block_size(channel, sm)) in sparse_read_blk64()
382 cur_block = block_to_sparse_block(block, &offset, channel, sm); in sparse_read_blk64()
390 channel, sm); in sparse_read_blk64()
392 memcpy(out + (i * channel->block_size), in sparse_read_blk64()
394 channel->block_size); in sparse_read_blk64()
396 memset(out + (i * channel->block_size), 0, in sparse_read_blk64()
397 channel->block_size); in sparse_read_blk64()
403 static errcode_t sparse_read_blk(io_channel channel, unsigned long block, in sparse_read_blk() argument
406 return sparse_read_blk64(channel, block, count, buf); in sparse_read_blk()
409 static errcode_t sparse_write_blk64(io_channel channel, blk64_t block, in sparse_write_blk64() argument
415 struct sparse_map *sm = channel->private_data; in sparse_write_blk64()
417 if (check_block_size(channel, sm)) in sparse_write_blk64()
422 cur_block = block_to_sparse_block(block, &offset, channel, in sparse_write_blk64()
435 channel, sm); in sparse_write_blk64()
443 in + (i * channel->block_size), in sparse_write_blk64()
444 channel->block_size); in sparse_write_blk64()
450 static errcode_t sparse_write_blk(io_channel channel, unsigned long block, in sparse_write_blk() argument
453 return sparse_write_blk64(channel, block, count, buf); in sparse_write_blk()
456 static errcode_t sparse_discard(io_channel channel __attribute__((unused)), in sparse_discard() argument
460 struct sparse_map *sm = channel->private_data; in sparse_discard()
462 if (check_block_size(channel, sm)) in sparse_discard()
468 cur_block = block_to_sparse_block(blk + i, &offset, channel, in sparse_discard()
478 static errcode_t sparse_zeroout(io_channel channel, blk64_t blk, in sparse_zeroout() argument
481 return sparse_discard(channel, blk, count); in sparse_zeroout()
484 static errcode_t sparse_flush(io_channel channel __attribute__((unused))) in sparse_flush() argument
489 static errcode_t sparse_set_option(io_channel channel __attribute__((unused)), in sparse_set_option() argument
497 io_channel channel __attribute__((unused)), in sparse_cache_readahead() argument