qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] blockdev: no need to drain+flush in hmp_drive_del
@ 2015-05-28 14:17 Paolo Bonzini
  2015-05-28 14:21 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Paolo Bonzini @ 2015-05-28 14:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, armbru, open list:Block layer core

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>
---
 blockdev.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/blockdev.c b/blockdev.c
index 5eaf77e..d506a70 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2143,9 +2143,6 @@ int hmp_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data)
         return -1;
     }
 
-    /* quiesce block driver; prevent further io */
-    bdrv_drain_all();
-    bdrv_flush(bs);
     bdrv_close(bs);
 
     /* if we have a device attached to this BlockDriverState
-- 
2.4.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-06-26  8:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-28 14:17 [Qemu-devel] [PATCH] blockdev: no need to drain+flush in hmp_drive_del Paolo Bonzini
2015-05-28 14:21 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2015-05-29  1:45 ` [Qemu-devel] " Fam Zheng
2015-05-29 12:41 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-06-25 12:18 ` [Qemu-devel] " Paolo Bonzini
2015-06-26  8:53 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).