Home
last modified time | relevance | path

Searched refs:blk (Results 1 – 25 of 340) sorted by relevance

12345678910>>...14

/openbmc/qemu/block/
H A Dblock-backend.c99 BlockBackend *blk; member
122 blk_set_perm_locked(BlockBackend *blk, uint64_t perm, uint64_t shared_perm,
145 BlockBackend *blk = child->opaque; in blk_root_get_parent_desc() local
148 if (blk->name) { in blk_root_get_parent_desc()
149 return g_strdup_printf("block device '%s'", blk->name); in blk_root_get_parent_desc()
152 dev_id = blk_get_attached_dev_id(blk); in blk_root_get_parent_desc()
169 BlockBackend *blk = opaque; in blk_vm_state_changed() local
175 qemu_del_vm_change_state_handler(blk->vmsh); in blk_vm_state_changed()
176 blk->vmsh = NULL; in blk_vm_state_changed()
177 blk_set_perm(blk, blk->perm, blk->shared_perm, &local_err); in blk_vm_state_changed()
[all …]
H A Dqapi-system.c45 BlockBackend *blk; in qmp_get_blk() local
53 blk = blk_by_qdev_id(qdev_id, errp); in qmp_get_blk()
55 blk = blk_by_name(blk_name); in qmp_get_blk()
56 if (blk == NULL) { in qmp_get_blk()
62 return blk; in qmp_get_blk()
79 BlockBackend *blk; in do_open_tray() local
83 blk = qmp_get_blk(blk_name, qdev_id, errp); in do_open_tray()
84 if (!blk) { in do_open_tray()
88 if (!blk_dev_has_removable_media(blk)) { in do_open_tray()
93 if (!blk_dev_has_tray(blk)) { in do_open_tray()
[all …]
/openbmc/linux/sound/pci/ctxfi/
Dcthardware.h
Dcthw20k2.c
Dcthw20k1.c
/openbmc/qemu/include/system/
H A Dblock-backend-io.h26 const char *blk_name(const BlockBackend *blk);
28 BlockDriverState *blk_bs(BlockBackend *blk);
30 void blk_set_allow_write_beyond_eof(BlockBackend *blk, bool allow);
31 void blk_set_allow_aio_context_change(BlockBackend *blk, bool allow);
32 void blk_set_disable_request_queuing(BlockBackend *blk, bool disable);
33 bool blk_iostatus_is_enabled(const BlockBackend *blk);
42 char *blk_get_attached_dev_id(BlockBackend *blk);
44 BlockAIOCB *blk_aio_pwrite_zeroes(BlockBackend *blk, int64_t offset,
48 BlockAIOCB *blk_aio_preadv(BlockBackend *blk, int64_t offset,
51 BlockAIOCB *blk_aio_pwritev(BlockBackend *blk, int64_t offset,
[all …]
H A Dblock-backend-global-state.h43 int blk_get_refcnt(BlockBackend *blk);
44 void blk_ref(BlockBackend *blk);
46 void no_coroutine_fn blk_unref(BlockBackend *blk);
47 void coroutine_fn no_co_wrapper blk_co_unref(BlockBackend *blk);
51 BlockBackend *blk_next(BlockBackend *blk);
52 BlockBackend *blk_all_next(BlockBackend *blk);
53 bool monitor_add_blk(BlockBackend *blk, const char *name, Error **errp);
54 void monitor_remove_blk(BlockBackend *blk);
56 BlockBackendPublic *blk_get_public(BlockBackend *blk);
58 void GRAPH_UNLOCKED blk_remove_bs(BlockBackend *blk);
[all …]
/openbmc/linux/arch/powerpc/lib/
Drheap.c
/openbmc/u-boot/fs/yaffs2/
H A Dyaffs_bitmap.c20 static inline u8 *yaffs_block_bits(struct yaffs_dev *dev, int blk) in yaffs_block_bits() argument
22 if (blk < dev->internal_start_block || blk > dev->internal_end_block) { in yaffs_block_bits()
25 blk); in yaffs_block_bits()
29 (dev->chunk_bit_stride * (blk - dev->internal_start_block)); in yaffs_block_bits()
32 void yaffs_verify_chunk_bit_id(struct yaffs_dev *dev, int blk, int chunk) in yaffs_verify_chunk_bit_id() argument
34 if (blk < dev->internal_start_block || blk > dev->internal_end_block || in yaffs_verify_chunk_bit_id()
38 blk, chunk); in yaffs_verify_chunk_bit_id()
43 void yaffs_clear_chunk_bits(struct yaffs_dev *dev, int blk) in yaffs_clear_chunk_bits() argument
45 u8 *blk_bits = yaffs_block_bits(dev, blk); in yaffs_clear_chunk_bits()
50 void yaffs_clear_chunk_bit(struct yaffs_dev *dev, int blk, int chunk) in yaffs_clear_chunk_bit() argument
[all …]
H A Dyaffs_bitmap.h25 void yaffs_verify_chunk_bit_id(struct yaffs_dev *dev, int blk, int chunk);
26 void yaffs_clear_chunk_bits(struct yaffs_dev *dev, int blk);
27 void yaffs_clear_chunk_bit(struct yaffs_dev *dev, int blk, int chunk);
28 void yaffs_set_chunk_bit(struct yaffs_dev *dev, int blk, int chunk);
29 int yaffs_check_chunk_bit(struct yaffs_dev *dev, int blk, int chunk);
30 int yaffs_still_some_chunks(struct yaffs_dev *dev, int blk);
31 int yaffs_count_chunk_bits(struct yaffs_dev *dev, int blk);
H A Dyaffs_yaffs1.c25 int blk; in yaffs1_scan() local
50 for (blk = dev->internal_start_block; blk <= dev->internal_end_block; in yaffs1_scan()
51 blk++) { in yaffs1_scan()
52 yaffs_clear_chunk_bits(dev, blk); in yaffs1_scan()
56 yaffs_query_init_block_state(dev, blk, &state, &seq_number); in yaffs1_scan()
66 blk, state, seq_number); in yaffs1_scan()
70 "block %d is bad", blk); in yaffs1_scan()
80 for (blk = dev->internal_start_block; in yaffs1_scan()
81 !alloc_failed && blk <= dev->internal_end_block; blk++) { in yaffs1_scan()
85 bi = yaffs_get_block_info(dev, blk); in yaffs1_scan()
[all …]
/openbmc/qemu/tests/unit/
H A Dtest-blockjob.c33 static BlockJob *mk_job(BlockBackend *blk, const char *id, in mk_job() argument
40 job = block_job_create(id, drv, NULL, blk_bs(blk), in mk_job()
49 g_assert_cmpstr(job->job.id, ==, blk_name(blk)); in mk_job()
59 static BlockJob *do_test_id(BlockBackend *blk, const char *id, in do_test_id() argument
62 return mk_job(blk, id, &test_block_job_driver, in do_test_id()
71 BlockBackend *blk = blk_new(qemu_get_aio_context(), 0, BLK_PERM_ALL); in create_blk() local
79 blk_insert_bs(blk, bs, &error_abort); in create_blk()
84 monitor_add_blk(blk, name, &err); in create_blk()
88 return blk; in create_blk()
92 static void destroy_blk(BlockBackend *blk) in destroy_blk() argument
[all …]
H A Dtest-replication.c51 static void test_blk_read(BlockBackend *blk, long pattern, in test_blk_read() argument
76 blk_aio_preadv(blk, offset, &qiov, 0, blk_rw_done, &async_ret); in test_blk_read()
96 static void test_blk_write(BlockBackend *blk, long pattern, int64_t offset, in test_blk_write() argument
113 blk_aio_pwritev(blk, offset, &qiov, 0, blk_rw_done, &async_ret); in test_blk_write()
173 BlockBackend *blk; in start_primary() local
189 blk = blk_new_open(NULL, NULL, qdict, BDRV_O_RDWR, &error_abort); in start_primary()
190 g_assert(blk); in start_primary()
192 monitor_add_blk(blk, P_ID, &error_abort); in start_primary()
196 return blk; in start_primary()
201 BlockBackend *blk; in teardown_primary() local
[all …]
H A Dtest-block-iothread.c114 static void test_sync_op_blk_pread(BlockBackend *blk) in test_sync_op_blk_pread() argument
120 ret = blk_pread(blk, 0, sizeof(buf), buf, 0); in test_sync_op_blk_pread()
124 ret = blk_pread(blk, -2, sizeof(buf), buf, 0); in test_sync_op_blk_pread()
128 static void test_sync_op_blk_pwrite(BlockBackend *blk) in test_sync_op_blk_pwrite() argument
134 ret = blk_pwrite(blk, 0, sizeof(buf), buf, 0); in test_sync_op_blk_pwrite()
138 ret = blk_pwrite(blk, -2, sizeof(buf), buf, 0); in test_sync_op_blk_pwrite()
142 static void test_sync_op_blk_preadv(BlockBackend *blk) in test_sync_op_blk_preadv() argument
149 ret = blk_preadv(blk, 0, sizeof(buf), &qiov, 0); in test_sync_op_blk_preadv()
153 ret = blk_preadv(blk, -2, sizeof(buf), &qiov, 0); in test_sync_op_blk_preadv()
157 static void test_sync_op_blk_pwritev(BlockBackend *blk) in test_sync_op_blk_pwritev() argument
[all …]
H A Dtest-crypto-block.c249 QCryptoBlock *blk) in test_block_assert_setup() argument
254 ivgen = qcrypto_block_get_ivgen(blk); in test_block_assert_setup()
255 cipher = qcrypto_block_get_cipher(blk); in test_block_assert_setup()
263 qcrypto_block_get_kdf_hash(blk)); in test_block_assert_setup()
275 QCryptoBlock *blk; in test_block() local
282 blk = qcrypto_block_create(data->create_opts, NULL, in test_block()
288 g_assert(blk); in test_block()
296 test_block_assert_setup(data, blk); in test_block()
298 qcrypto_block_free(blk); in test_block()
302 blk = qcrypto_block_open(data->open_opts, NULL, in test_block()
[all …]
H A Dtest-block-backend.c41 BlockBackend *blk = blk_new(qemu_get_aio_context(), in test_drain_aio_error() local
46 acb = blk_aio_flush(blk, test_drain_aio_error_flush_cb, &completed); in test_drain_aio_error()
50 blk_drain(blk); in test_drain_aio_error()
53 blk_unref(blk); in test_drain_aio_error()
58 BlockBackend *blk = blk_new(qemu_get_aio_context(), in test_drain_all_aio_error() local
63 acb = blk_aio_flush(blk, test_drain_aio_error_flush_cb, &completed); in test_drain_all_aio_error()
70 blk_unref(blk); in test_drain_all_aio_error()
/openbmc/linux/sound/synth/
Dutil_mem.c
/openbmc/u-boot/fs/
H A Dfs_internal.c13 int fs_devread(struct blk_desc *blk, disk_partition_t *partition, in fs_devread() argument
18 ALLOC_CACHE_ALIGN_BUFFER(char, sec_buf, (blk ? blk->blksz : 0)); in fs_devread()
19 if (blk == NULL) { in fs_devread()
23 log2blksz = blk->log2blksz; in fs_devread()
35 byte_offset &= blk->blksz - 1; in fs_devread()
42 if (blk_dread(blk, partition->start + sector, 1, in fs_devread()
47 readlen = min((int)blk->blksz - byte_offset, in fs_devread()
59 block_len = byte_len & ~(blk->blksz - 1); in fs_devread()
62 ALLOC_CACHE_ALIGN_BUFFER(u8, p, blk->blksz); in fs_devread()
64 block_len = blk->blksz; in fs_devread()
[all …]
/openbmc/qemu/hw/block/
H A Dblock.c27 static int blk_pread_nonzeroes(BlockBackend *blk, hwaddr size, void *buf) in blk_pread_nonzeroes() argument
31 BlockDriverState *bs = blk_bs(blk); in blk_pread_nonzeroes()
43 ret = blk_pread(blk, offset, bytes, (uint8_t *) buf + offset, 0); in blk_pread_nonzeroes()
63 bool blk_check_size_and_read_all(BlockBackend *blk, DeviceState *dev, in blk_check_size_and_read_all() argument
74 blk_len = blk_getlength(blk); in blk_check_size_and_read_all()
77 "can't get size of %s block backend", blk_name(blk)); in blk_check_size_and_read_all()
85 blk_name(blk), blk_len); in blk_check_size_and_read_all()
96 ret = blk_pread_nonzeroes(blk, size, buf); in blk_check_size_and_read_all()
101 blk_name(blk), object_get_typename(OBJECT(dev)), in blk_check_size_and_read_all()
110 BlockBackend *blk = conf->blk; in blkconf_blocksizes() local
[all …]
H A Dhd-geometry.c54 static int guess_disk_lchs(BlockBackend *blk, in guess_disk_lchs() argument
63 blk_get_geometry(blk, &nb_sectors); in guess_disk_lchs()
65 if (blk_pread(blk, 0, BDRV_SECTOR_SIZE, buf, 0) < 0) { in guess_disk_lchs()
90 trace_hd_geometry_lchs_guess(blk, cylinders, heads, sectors); in guess_disk_lchs()
97 static void guess_chs_for_size(BlockBackend *blk, in guess_chs_for_size() argument
103 blk_get_geometry(blk, &nb_sectors); in guess_chs_for_size()
116 void hd_geometry_guess(BlockBackend *blk, in hd_geometry_guess() argument
125 if (blk_probe_geometry(blk, &geo) == 0) { in hd_geometry_guess()
130 } else if (guess_disk_lchs(blk, &cylinders, &heads, &secs) < 0) { in hd_geometry_guess()
132 guess_chs_for_size(blk, pcyls, pheads, psecs); in hd_geometry_guess()
[all …]
/openbmc/qemu/
H A Dqemu-io-cmds.c58 static int init_check_command(BlockBackend *blk, const cmdinfo_t *ct) in init_check_command() argument
63 if (!(ct->flags & CMD_NOFILE_OK) && !blk) { in init_check_command()
70 static int command(BlockBackend *blk, const cmdinfo_t *ct, int argc, in command() argument
75 if (!init_check_command(blk, ct)) { in command()
108 assert(blk || !ct->perm); in command()
109 if (ct->perm && blk_is_available(blk)) { in command()
111 blk_get_perm(blk, &orig_perm, &orig_shared_perm); in command()
120 ret = blk_set_perm(blk, new_perm, orig_shared_perm, &local_err); in command()
129 return ct->cfunc(blk, argc, argv); in command()
341 static void *qemu_io_alloc(BlockBackend *blk, size_t len, int pattern, in qemu_io_alloc() argument
[all …]
/openbmc/linux/block/partitions/
Damiga.c
/openbmc/qemu/pc-bios/s390-ccw/
H A Dvirtio-blkdev.c125 vdev->config.blk.blk_size = VIRTIO_ISO_BLOCK_SIZE; in virtio_assume_iso9660()
126 vdev->config.blk.physical_block_exp = 0; in virtio_assume_iso9660()
141 vdev->config.blk.physical_block_exp = 0; in virtio_assume_eckd()
144 vdev->config.blk.blk_size = VIRTIO_DASD_DEFAULT_BLOCK_SIZE; in virtio_assume_eckd()
147 vdev->config.blk.blk_size = vdev->scsi_block_size; in virtio_assume_eckd()
150 vdev->config.blk.geometry.heads = 15; in virtio_assume_eckd()
151 vdev->config.blk.geometry.sectors = in virtio_assume_eckd()
152 virtio_eckd_sectors_for_block_size(vdev->config.blk.blk_size); in virtio_assume_eckd()
176 return vdev->config.blk.blk_size; in virtio_get_block_size()
189 return vdev->config.blk.geometry.heads; in virtio_get_heads()
[all …]
/openbmc/linux/fs/affs/
Dbitmap.c
/openbmc/qemu/hw/misc/
H A Dsifive_u_otp.c64 if (s->blk) { in sifive_u_otp_read()
67 if (blk_pread(s->blk, s->pa * SIFIVE_U_OTP_FUSE_WORD, in sifive_u_otp_read()
168 if (s->blk) { in sifive_u_otp_write()
169 if (blk_pwrite(s->blk, s->pa * SIFIVE_U_OTP_FUSE_WORD, in sifive_u_otp_write()
199 DEFINE_PROP_DRIVE("drive", SiFiveUOTPState, blk),
216 BlockBackend *blk; in sifive_u_otp_realize() local
218 blk = blk_by_legacy_dinfo(dinfo); in sifive_u_otp_realize()
220 if (blk_getlength(blk) < filesize) { in sifive_u_otp_realize()
225 qdev_prop_set_drive_err(dev, "drive", blk, errp); in sifive_u_otp_realize()
227 if (s->blk) { in sifive_u_otp_realize()
[all …]

12345678910>>...14