Lines Matching full:if

47     if (!blk_name == !qdev_id) {  in qmp_get_blk()
52 if (qdev_id) { in qmp_get_blk()
56 if (blk == NULL) { in qmp_get_blk()
67 * If @force, ignore its tray lock.
68 * Else, if the tray is locked, don't open it, but ask the guest to open it.
70 * If @device does not exist, return -ENODEV.
71 * If it has no removable media, return -ENOTSUP.
72 * If it has no tray, return -ENOSYS.
73 * If the guest was asked to open the tray, return -EINPROGRESS.
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()
98 if (blk_dev_is_tray_open(blk)) { in do_open_tray()
103 if (locked) { in do_open_tray()
107 if (!locked || force) { in do_open_tray()
111 if (locked && !force) { in do_open_tray()
128 if (!has_force) { in qmp_blockdev_open_tray()
132 if (rc && rc != -ENOSYS && rc != -EINPROGRESS) { in qmp_blockdev_open_tray()
147 if (!blk) { in qmp_blockdev_close_tray()
151 if (!blk_dev_has_removable_media(blk)) { in qmp_blockdev_close_tray()
156 if (!blk_dev_has_tray(blk)) { in qmp_blockdev_close_tray()
161 if (!blk_dev_is_tray_open(blk)) { in qmp_blockdev_close_tray()
166 if (local_err) { in qmp_blockdev_close_tray()
182 if (!blk) { in blockdev_remove_medium()
189 if (has_attached_device && !blk_dev_has_removable_media(blk)) { in blockdev_remove_medium()
194 if (has_attached_device && blk_dev_has_tray(blk) && in blockdev_remove_medium()
202 if (!bs) { in blockdev_remove_medium()
207 if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_EJECT, errp)) { in blockdev_remove_medium()
215 if (!blk_dev_has_tray(blk)) { in blockdev_remove_medium()
239 if (has_device && !blk_dev_has_removable_media(blk)) { in qmp_blockdev_insert_anon_medium()
244 if (has_device && blk_dev_has_tray(blk) && !blk_dev_is_tray_open(blk)) { in qmp_blockdev_insert_anon_medium()
249 if (blk_bs(blk)) { in qmp_blockdev_insert_anon_medium()
255 if (ret < 0) { in qmp_blockdev_insert_anon_medium()
259 if (!blk_dev_has_tray(blk)) { in qmp_blockdev_insert_anon_medium()
266 if (local_err) { in qmp_blockdev_insert_anon_medium()
283 if (!blk) { in blockdev_insert_medium()
288 if (!bs) { in blockdev_insert_medium()
293 if (bdrv_has_blk(bs)) { in blockdev_insert_medium()
325 if (!blk) { in qmp_blockdev_change_medium()
329 if (blk_bs(blk)) { in qmp_blockdev_change_medium()
337 if (!has_read_only) { in qmp_blockdev_change_medium()
361 if (format) { in qmp_blockdev_change_medium()
367 if (!medium_bs) { in qmp_blockdev_change_medium()
372 if (rc && rc != -ENOSYS) { in qmp_blockdev_change_medium()
380 if (err) { in qmp_blockdev_change_medium()
386 if (err) { in qmp_blockdev_change_medium()
394 /* If the medium has been inserted, the device has its own reference, so in qmp_blockdev_change_medium()
395 * ours must be relinquished; and if it has not been inserted successfully, in qmp_blockdev_change_medium()
406 if (!has_force) { in qmp_eject()
411 if (rc && rc != -ENOSYS) { in qmp_eject()
428 if (!blk) { in qmp_block_set_io_throttle()
433 if (!bs) { in qmp_block_set_io_throttle()
447 if (arg->has_bps_max) { in qmp_block_set_io_throttle()
450 if (arg->has_bps_rd_max) { in qmp_block_set_io_throttle()
453 if (arg->has_bps_wr_max) { in qmp_block_set_io_throttle()
456 if (arg->has_iops_max) { in qmp_block_set_io_throttle()
459 if (arg->has_iops_rd_max) { in qmp_block_set_io_throttle()
462 if (arg->has_iops_wr_max) { in qmp_block_set_io_throttle()
466 if (arg->has_bps_max_length) { in qmp_block_set_io_throttle()
469 if (arg->has_bps_rd_max_length) { in qmp_block_set_io_throttle()
472 if (arg->has_bps_wr_max_length) { in qmp_block_set_io_throttle()
475 if (arg->has_iops_max_length) { in qmp_block_set_io_throttle()
478 if (arg->has_iops_rd_max_length) { in qmp_block_set_io_throttle()
481 if (arg->has_iops_wr_max_length) { in qmp_block_set_io_throttle()
485 if (arg->has_iops_size) { in qmp_block_set_io_throttle()
489 if (!throttle_is_valid(&cfg, errp)) { in qmp_block_set_io_throttle()
493 if (throttle_enabled(&cfg)) { in qmp_block_set_io_throttle()
494 /* Enable I/O limits if they're not enabled yet, otherwise in qmp_block_set_io_throttle()
496 if (!blk_get_public(blk)->throttle_group_member.throttle_state) { in qmp_block_set_io_throttle()
498 } else if (arg->group) { in qmp_block_set_io_throttle()
503 } else if (blk_get_public(blk)->throttle_group_member.throttle_state) { in qmp_block_set_io_throttle()
504 /* If all throttling settings are set to 0, disable I/O limits */ in qmp_block_set_io_throttle()
522 if (!blk) { in qmp_block_latency_histogram_set()
528 if (!has_boundaries && !has_boundaries_read && !has_boundaries_write && in qmp_block_latency_histogram_set()
535 if (has_boundaries || has_boundaries_read) { in qmp_block_latency_histogram_set()
539 if (ret) { in qmp_block_latency_histogram_set()
545 if (has_boundaries || has_boundaries_write) { in qmp_block_latency_histogram_set()
549 if (ret) { in qmp_block_latency_histogram_set()
555 if (has_boundaries || has_boundaries_append) { in qmp_block_latency_histogram_set()
559 if (ret) { in qmp_block_latency_histogram_set()
565 if (has_boundaries || has_boundaries_flush) { in qmp_block_latency_histogram_set()
569 if (ret) { in qmp_block_latency_histogram_set()