]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Change default werror semantics from "report" to "enospc"
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 28 Feb 2009 16:51:01 +0000 (16:51 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 28 Feb 2009 16:51:01 +0000 (16:51 +0000)
Practically speaking, "report" causes a lot of issues when encountering a host
ENOSPC error.  Switch to "enospc" as the default werror semantics.  All host
errors other than ENOSPC will be reported to the guest.  ENOSPC will cause the
VM to stop.  Asynchronous notifications are needed to inform management tools
that some action should be taken but stopping the VM is at least better than
undefined behavior in the guest.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6655 c046a42c-6fe2-441c-8c8c-71466251a162

vl.c

diff --git a/vl.c b/vl.c
index 1d96a313db15a1391dac2add4197eb2216d5aa08..d3863c493b7f024d9f09a463293e8b26ab6523f2 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -2243,7 +2243,7 @@ BlockInterfaceErrorAction drive_get_onerror(BlockDriverState *bdrv)
         if (drives_table[index].bdrv == bdrv)
             return drives_table[index].onerror;
 
-    return BLOCK_ERR_REPORT;
+    return BLOCK_ERR_STOP_ENOSPC;
 }
 
 static void bdrv_format_print(void *opaque, const char *name)
@@ -2479,7 +2479,7 @@ int drive_init(struct drive_opt *arg, int snapshot, void *opaque)
     if (!get_param_value(serial, sizeof(serial), "serial", str))
            memset(serial, 0,  sizeof(serial));
 
-    onerror = BLOCK_ERR_REPORT;
+    onerror = BLOCK_ERR_STOP_ENOSPC;
     if (get_param_value(buf, sizeof(serial), "werror", str)) {
         if (type != IF_IDE && type != IF_SCSI && type != IF_VIRTIO) {
             fprintf(stderr, "werror is no supported by this format\n");