aboutsummaryrefslogtreecommitdiff
path: root/include/block
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-06-24 13:06:13 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-06-24 13:06:13 +0100
commit089a39486f2c47994c6c0d34ac7abf34baf40d9d (patch)
tree07bf9220989162df8d29b99568d13ce6d5261822 /include/block
parent27acb9dd2407f41550e453b85aa5ebf1bd618b79 (diff)
parentd622cb5879ca8006d5482158e4e3b272a068c301 (diff)
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp: (43 commits) monitor: protect event emission monitor: protect outbuf and mux_out with mutex qemu-char: make writes thread-safe qemu-char: move pty_chr_update_read_handler around qemu-char: do not call chr_write directly qemu-char: introduce qemu_chr_alloc qapi event: clean up qapi event: convert QUORUM events qapi event: convert GUEST_PANICKED qapi event: convert BALLOON_CHANGE qmp: convert ACPI_DEVICE_OST event qapi event: convert SPICE events qapi event: convert VNC events qapi event: convert NIC_RX_FILTER_CHANGED qapi event: convert other BLOCK_JOB events qapi event: convert BLOCK_IMAGE_CORRUPTED qapi event: convert BLOCK_IO_ERROR and BLOCK_JOB_ERROR qapi event: convert DEVICE_TRAY_MOVED qapi event: convert DEVICE_DELETED qapi event: convert WATCHDOG ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/block.h4
-rw-r--r--include/block/block_int.h3
-rw-r--r--include/block/blockjob.h17
3 files changed, 13 insertions, 11 deletions
diff --git a/include/block/block.h b/include/block/block.h
index f15b99b00b..d0baf4fb83 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -150,10 +150,6 @@ typedef enum {
#define BDRV_BLOCK_ALLOCATED 0x10
#define BDRV_BLOCK_OFFSET_MASK BDRV_SECTOR_MASK
-typedef enum {
- BDRV_ACTION_REPORT, BDRV_ACTION_IGNORE, BDRV_ACTION_STOP
-} BlockErrorAction;
-
typedef QSIMPLEQ_HEAD(BlockReopenQueue, BlockReopenQueueEntry) BlockReopenQueue;
typedef struct BDRVReopenState {
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 7aa2213f77..715c761fad 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -425,9 +425,6 @@ void bdrv_attach_aio_context(BlockDriverState *bs,
#ifdef _WIN32
int is_windows_drive(const char *filename);
#endif
-void bdrv_emit_qmp_error_event(const BlockDriverState *bdrv,
- enum MonitorEvent ev,
- BlockErrorAction action, bool is_read);
/**
* stream_start:
diff --git a/include/block/blockjob.h b/include/block/blockjob.h
index c0a787530b..e443987ea8 100644
--- a/include/block/blockjob.h
+++ b/include/block/blockjob.h
@@ -217,12 +217,21 @@ void block_job_pause(BlockJob *job);
void block_job_resume(BlockJob *job);
/**
- * qobject_from_block_job:
+ * block_job_event_cancle:
* @job: The job whose information is requested.
*
- * Return a QDict corresponding to @job's query-block-jobs entry.
+ * Send a BLOCK_JOB_CANCELLED event for the specified job.
*/
-QObject *qobject_from_block_job(BlockJob *job);
+void block_job_event_cancelled(BlockJob *job);
+
+/**
+ * block_job_ready:
+ * @job: The job which is now ready to complete.
+ * @msg: Error message. Only present on failure.
+ *
+ * Send a BLOCK_JOB_COMPLETED event for the specified job.
+ */
+void block_job_event_completed(BlockJob *job, const char *msg);
/**
* block_job_ready:
@@ -230,7 +239,7 @@ QObject *qobject_from_block_job(BlockJob *job);
*
* Send a BLOCK_JOB_READY event for the specified job.
*/
-void block_job_ready(BlockJob *job);
+void block_job_event_ready(BlockJob *job);
/**
* block_job_is_paused: