From 126b8bbdfe8bc4042f13f230a4b36f90646f47c6 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 28 May 2015 16:17:09 +0200 Subject: [PATCH] blockdev: no need to drain+flush in hmp_drive_del 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 Reviewed-by: Alberto Garcia Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Message-id: 1432822629-25401-1-git-send-email-pbonzini@redhat.com Signed-off-by: Stefan Hajnoczi --- blockdev.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index b35467646e..4d5e016e62 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