diff mbox

[PULL,04/17] blockdev: no need to drain+flush in hmp_drive_del

Message ID 1435828789-9647-5-git-send-email-stefanha@redhat.com
State New
Headers show

Commit Message

Stefan Hajnoczi July 2, 2015, 9:19 a.m. UTC
From: Paolo Bonzini <pbonzini@redhat.com>

bdrv_close already does that, and in fact hmp_drive_del would need
another drain after the flush (which bdrv_close does).  So remove
the duplication.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1432822629-25401-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 blockdev.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox

Patch

diff --git a/blockdev.c b/blockdev.c
index b354676..4d5e016 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2167,9 +2167,6 @@  void hmp_drive_del(Monitor *mon, const QDict *qdict)
         return;
     }
 
-    /* quiesce block driver; prevent further io */
-    bdrv_drain_all();
-    bdrv_flush(bs);
     bdrv_close(bs);
 
     /* if we have a device attached to this BlockDriverState