summaryrefslogtreecommitdiff
path: root/block.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2010-06-02 18:55:17 +0200
committerKevin Wolf <kwolf@redhat.com>2010-06-15 09:41:59 +0200
commitabd7f68d081ef5adb425f659c7449149987bf89e (patch)
tree0bb8f33deaa33cc945b69ef7ba549b07babacb06 /block.h
parent2063392ae5d00a9ea13039f971e2b9e61bd68dbc (diff)
downloadqemu-abd7f68d081ef5adb425f659c7449149987bf89e.tar.gz
block: Move error actions from DriveInfo to BlockDriverState
That's where they belong semantically (block device host part), even though the actions are actually executed by guest device code. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.h')
-rw-r--r--block.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/block.h b/block.h
index a340ffdaf3..d22401fdba 100644
--- a/block.h
+++ b/block.h
@@ -42,6 +42,11 @@ typedef struct QEMUSnapshotInfo {
#define BDRV_SECTOR_MASK ~(BDRV_SECTOR_SIZE - 1)
typedef enum {
+ BLOCK_ERR_REPORT, BLOCK_ERR_IGNORE, BLOCK_ERR_STOP_ENOSPC,
+ BLOCK_ERR_STOP_ANY
+} BlockErrorAction;
+
+typedef enum {
BDRV_ACTION_REPORT, BDRV_ACTION_IGNORE, BDRV_ACTION_STOP
} BlockMonEventAction;
@@ -146,6 +151,9 @@ void bdrv_get_geometry_hint(BlockDriverState *bs,
int *pcyls, int *pheads, int *psecs);
int bdrv_get_type_hint(BlockDriverState *bs);
int bdrv_get_translation_hint(BlockDriverState *bs);
+void bdrv_set_on_error(BlockDriverState *bs, BlockErrorAction on_read_error,
+ BlockErrorAction on_write_error);
+BlockErrorAction bdrv_get_on_error(BlockDriverState *bs, int is_read);
int bdrv_is_removable(BlockDriverState *bs);
int bdrv_is_read_only(BlockDriverState *bs);
int bdrv_is_sg(BlockDriverState *bs);