qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 01/17] block/throttle-groups: throttle_group_co_io_limits_


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 01/17] block/throttle-groups: throttle_group_co_io_limits_intercept(): 64bit bytes
Date: Mon, 27 Apr 2020 12:05:17 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 4/27/20 10:23 AM, Vladimir Sementsov-Ogievskiy wrote:
The function is called from 64bit io handlers, and bytes is just passed
to throttle_account() which is 64bit too (unsigned though). So, let's
convert intermediate argument to 64bit too.

What is the meaning of negative bytes in this function?


Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
  include/block/throttle-groups.h | 2 +-
  block/throttle-groups.c         | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/block/throttle-groups.h b/include/block/throttle-groups.h
index 712a8e64b4..f921994b8a 100644
--- a/include/block/throttle-groups.h
+++ b/include/block/throttle-groups.h
@@ -76,7 +76,7 @@ void throttle_group_unregister_tgm(ThrottleGroupMember *tgm);
  void throttle_group_restart_tgm(ThrottleGroupMember *tgm);
void coroutine_fn throttle_group_co_io_limits_intercept(ThrottleGroupMember *tgm,
-                                                        unsigned int bytes,
+                                                        int64_t bytes,
                                                          bool is_write);
  void throttle_group_attach_aio_context(ThrottleGroupMember *tgm,
                                         AioContext *new_context);
diff --git a/block/throttle-groups.c b/block/throttle-groups.c
index 37695b0cd7..37d1b7a8b8 100644
--- a/block/throttle-groups.c
+++ b/block/throttle-groups.c
@@ -358,7 +358,7 @@ static void schedule_next_request(ThrottleGroupMember *tgm, 
bool is_write)
   * @is_write:  the type of operation (read/write)
   */
  void coroutine_fn throttle_group_co_io_limits_intercept(ThrottleGroupMember 
*tgm,
-                                                        unsigned int bytes,
+                                                        int64_t bytes,
                                                          bool is_write)
  {
      bool must_wait;





reply via email to

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