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

* Re: [Qemu-devel] [Qemu-block] [PATCH] blockdev: no need to drain+flush in hmp_drive_del
  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 ` Alberto Garcia
  2015-05-29  1:45 ` [Qemu-devel] " Fam Zheng
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Alberto Garcia @ 2015-05-28 14:21 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: armbru, open list:Block layer core

On Thu 28 May 2015 04:17:09 PM CEST, Paolo Bonzini <pbonzini@redhat.com> wrote:
> 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>

Berto

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

* Re: [Qemu-devel] [PATCH] blockdev: no need to drain+flush in hmp_drive_del
  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 ` Fam Zheng
  2015-05-29 12:41 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Fam Zheng @ 2015-05-29  1:45 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Kevin Wolf, qemu-devel, open list:Block layer core, armbru



----- 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 <pbonzini@redhat.com>

Reviewed-by: Fam Zheng <famz@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	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [Qemu-block] [PATCH] blockdev: no need to drain+flush in hmp_drive_del
  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 ` Stefan Hajnoczi
  2015-06-25 12:18 ` [Qemu-devel] " Paolo Bonzini
  2015-06-26  8:53 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
  4 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2015-05-29 12:41 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, open list:Block layer core, armbru

[-- Attachment #1: Type: text/plain, Size: 400 bytes --]

On Thu, May 28, 2015 at 04:17:09PM +0200, Paolo Bonzini wrote:
> 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(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [Qemu-devel] [PATCH] blockdev: no need to drain+flush in hmp_drive_del
  2015-05-28 14:17 [Qemu-devel] [PATCH] blockdev: no need to drain+flush in hmp_drive_del Paolo Bonzini
                   ` (2 preceding siblings ...)
  2015-05-29 12:41 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
@ 2015-06-25 12:18 ` Paolo Bonzini
  2015-06-26  8:53 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
  4 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2015-06-25 12:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, armbru, Block layer core

Ping?

Paolo

On 28/05/2015 16:17, Paolo Bonzini wrote:
> 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
> 

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

* Re: [Qemu-devel] [Qemu-block] [PATCH] blockdev: no need to drain+flush in hmp_drive_del
  2015-05-28 14:17 [Qemu-devel] [PATCH] blockdev: no need to drain+flush in hmp_drive_del Paolo Bonzini
                   ` (3 preceding siblings ...)
  2015-06-25 12:18 ` [Qemu-devel] " Paolo Bonzini
@ 2015-06-26  8:53 ` Stefan Hajnoczi
  4 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2015-06-26  8:53 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, open list:Block layer core, armbru

[-- Attachment #1: Type: text/plain, Size: 441 bytes --]

On Thu, May 28, 2015 at 04:17:09PM +0200, Paolo Bonzini wrote:
> 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(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[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).