Lines Matching refs:blk
26 static int blk_pread_nonzeroes(BlockBackend *blk, hwaddr size, void *buf) in blk_pread_nonzeroes() argument
30 BlockDriverState *bs = blk_bs(blk); in blk_pread_nonzeroes()
42 ret = blk_pread(blk, offset, bytes, (uint8_t *) buf + offset, 0); in blk_pread_nonzeroes()
62 bool blk_check_size_and_read_all(BlockBackend *blk, DeviceState *dev, in blk_check_size_and_read_all() argument
69 blk_len = blk_getlength(blk); in blk_check_size_and_read_all()
72 "can't get size of %s block backend", blk_name(blk)); in blk_check_size_and_read_all()
80 blk_name(blk), blk_len); in blk_check_size_and_read_all()
91 ret = blk_pread_nonzeroes(blk, size, buf); in blk_check_size_and_read_all()
96 blk_name(blk), object_get_typename(OBJECT(dev)), in blk_check_size_and_read_all()
105 BlockBackend *blk = conf->blk; in blkconf_blocksizes() local
113 use_blocksizes = !blk_probe_blocksizes(blk, &blocksizes); in blkconf_blocksizes()
118 use_blocksizes = !blk_probe_blocksizes(blk, &blocksizes); in blkconf_blocksizes()
119 bs = blk_bs(blk); in blkconf_blocksizes()
202 BlockBackend *blk = conf->blk; in blkconf_apply_backend_options() local
221 ret = blk_set_perm(blk, perm, shared_perm, errp); in blkconf_apply_backend_options()
229 case ON_OFF_AUTO_AUTO: wce = blk_enable_write_cache(blk); break; in blkconf_apply_backend_options()
236 rerror = blk_get_on_error(blk, true); in blkconf_apply_backend_options()
241 werror = blk_get_on_error(blk, false); in blkconf_apply_backend_options()
244 blk_set_enable_write_cache(blk, wce); in blkconf_apply_backend_options()
245 blk_set_on_error(blk, rerror, werror); in blkconf_apply_backend_options()
247 block_acct_setup(blk_get_stats(blk), conf->account_invalid, in blkconf_apply_backend_options()
257 hd_geometry_guess(conf->blk, in blkconf_geometry()