Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 340e01248478ba8b78a6d4d1809b1eff > files > 99

kvm-83-270.el5_11.src.rpm

From e7b394fca2ae616121f133e1e3c8fd137a349a05 Mon Sep 17 00:00:00 2001
From: aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Date: Sat, 28 Feb 2009 16:51:01 +0000
Subject: [PATCH 2/2] Change default werror semantics from "report" to "enospc"

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>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
RH-Upstream-status: applied(qemu/master)
Bugzilla: 481863
Acked-by: Dor Laor <dlaor@redhat.com>
Acked-by: Eduardo Habkost <ehabkost@redhat.com>
---
 qemu/vl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qemu/vl.c b/qemu/vl.c
index 32dd6d5..4d2cf00 100644
--- a/qemu/vl.c
+++ b/qemu/vl.c
@@ -2322,7 +2322,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)
@@ -2571,7 +2571,7 @@ int drive_init(struct drive_opt *arg, int snapshot,
     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");
-- 
1.6.1