]> git.proxmox.com Git - mirror_qemu.git/commitdiff
blockdev: no need to drain+flush in hmp_drive_del
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 28 May 2015 14:17:09 +0000 (16:17 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 2 Jul 2015 08:20:18 +0000 (09:20 +0100)
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

index b35467646eeb4e1cde394f18be99e2bb33d35033..4d5e016e62db82e93b7b8d361c8e54ad2c7665c7 100644 (file)
@@ -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