From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy9Me-0000Ey-Sh for qemu-devel@nongnu.org; Thu, 28 May 2015 21:45:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy9Me-0005rD-3A for qemu-devel@nongnu.org; Thu, 28 May 2015 21:45:36 -0400 Date: Thu, 28 May 2015 21:45:29 -0400 (EDT) From: Fam Zheng Message-ID: <1022620908.6042939.1432863929482.JavaMail.zimbra@redhat.com> In-Reply-To: <1432822629-25401-1-git-send-email-pbonzini@redhat.com> References: <1432822629-25401-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] blockdev: no need to drain+flush in hmp_drive_del List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , qemu-devel@nongnu.org, "open list:Block layer core" , armbru@redhat.com ----- Original Message ----- > 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: Fam Zheng > --- > 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 > > >