Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 3160499aacb81f6735941eb4c372d87a > files > 192

kvm-83-164.el5_5.30.src.rpm

From ae88e1c42adb91a0e8aa3ddae71a5c6a037d46b9 Mon Sep 17 00:00:00 2001
From: Gleb Natapov <gleb@redhat.com>
Date: Sun, 29 Mar 2009 09:55:00 +0300
Subject: [PATCH 12/12] Show drive name on ENOSPC notification

On Thu, Mar 26, 2009 at 06:47:00PM +0200, Dan Kenigsberg wrote:
> On Thu, Mar 26, 2009 at 05:35:56PM +0200, Dor Laor wrote:
> > Here is an early bird version of the patch by Uri.
> > We need to change it a bit -
> >    - Print the driver that reached the high water mark
> >    - Once water mark is reached, increase it in a delta (configurable #)
> > automatically
> >      to prevent print storm.
> >
> > Once we have it + Gleb's describing the exact drive for enospc
>
> + Dan's usage thereof
>
> > we can
> > revert the info blockstat changes.
> > Comments?
>
> please give me a qemu with these two before they are committed
Here is my part:

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Bugzilla: 489964
RH-Upstream-status: pending
Acked-by: Dor Laor <dlaor@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
Acked-by: Eduardo Habkost <ehabkost@redhat.com>
---
 qemu/hw/ide.c        |    3 ++-
 qemu/hw/scsi-disk.c  |    3 ++-
 qemu/hw/virtio-blk.c |    3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/qemu/hw/ide.c b/qemu/hw/ide.c
index 4e1020d..ba4cce5 100644
--- a/qemu/hw/ide.c
+++ b/qemu/hw/ide.c
@@ -885,7 +885,8 @@ static int ide_handle_write_error(IDEState *s, int error, int op)
         s->bmdma->status |= op;
         vm_stop(0);
         term_printf_async(VMSTOP_ASYNC_EVENT,
-                "VM is stopped due to disk write error: %s\n", strerror(error));
+                "VM is stopped due to disk write error: %s: %s\n",
+		bdrv_get_device_name(s->bs), strerror(error));
     } else {
         if (op == BM_STATUS_DMA_RETRY)
             ide_dma_error(s);
diff --git a/qemu/hw/scsi-disk.c b/qemu/hw/scsi-disk.c
index 961a148..391066d 100644
--- a/qemu/hw/scsi-disk.c
+++ b/qemu/hw/scsi-disk.c
@@ -230,7 +230,8 @@ static int scsi_handle_write_error(SCSIRequest *r, int error)
         r->status |= SCSI_REQ_STATUS_RETRY;
         vm_stop(0);
         term_printf_async(VMSTOP_ASYNC_EVENT,
-                "VM is stopped due to disk write error: %s\n", strerror(error));
+                "VM is stopped due to disk write error: %s: %s\n",
+		bdrv_get_device_name(r->dev->bdrv), strerror(error));
     } else {
         scsi_command_complete(r, STATUS_CHECK_CONDITION,
                 SENSE_HARDWARE_ERROR);
diff --git a/qemu/hw/virtio-blk.c b/qemu/hw/virtio-blk.c
index 4e44313..baea65d 100644
--- a/qemu/hw/virtio-blk.c
+++ b/qemu/hw/virtio-blk.c
@@ -67,7 +67,8 @@ static int virtio_blk_handle_write_error(VirtIOBlockReq *req, int error)
         s->rq = req;
         vm_stop(0);
         term_printf_async(VMSTOP_ASYNC_EVENT,
-                "VM is stopped due to disk write error: %s\n", strerror(error));
+                "VM is stopped due to disk write error: %s: %s\n",
+		bdrv_get_device_name(req->dev->bs), strerror(error));
     } else {
         virtio_blk_req_complete(req, VIRTIO_BLK_S_IOERR);
     }
-- 
1.6.1