qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2 v15] throttle: factor out duplicate code


From: Pradeep Jagadeesh
Subject: Re: [Qemu-devel] [PATCH 2/2 v15] throttle: factor out duplicate code
Date: Fri, 3 Feb 2017 12:58:53 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

On 2/3/2017 11:38 AM, Alberto Garcia wrote:
On Fri 03 Feb 2017 11:04:58 AM CET, Pradeep Jagadeesh wrote:

This patch removes the redundant throttle code that was present in
block and fsdev device files. Now the common code is moved to a single
file.

Here it says that this patch moves common code to a separate file,
however:

Hmm, sorry. I just messed it up while merging.

Regards,
Pradeep

diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 920eb05..22a6a99 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -3532,7 +3532,6 @@ out:
         if (s->ops && s->ops->cleanup && s->ctx.private) {
             s->ops->cleanup(&s->ctx);
         }
-        fsdev_throttle_cleanup(s->ctx.fst);
         g_free(s->tag);
         g_free(s->ctx.fs_root);
         v9fs_path_free(&path);
@@ -3545,6 +3544,7 @@ void v9fs_device_unrealize_common(V9fsState *s, Error 
**errp)
     if (s->ops->cleanup) {
         s->ops->cleanup(&s->ctx);
     }
+    fsdev_throttle_cleanup(s->ctx.fst);
     g_free(s->tag);
     g_free(s->ctx.fs_root);
 }

This doesn't belong here. In patch 1 you add a fsdev_throttle_cleanup()
in v9fs_device_realize_common(), and in patch 2 you remove it from there
and put it in v9fs_device_unrealize_common().

It looks like you wanted to fix patch 1 but added the fix to patch 2
instead.

Berto





reply via email to

[Prev in Thread] Current Thread [Next in Thread]