From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNglq-00058h-E0 for qemu-devel@nongnu.org; Thu, 14 Jul 2016 09:33:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNgln-0007tS-8j for qemu-devel@nongnu.org; Thu, 14 Jul 2016 09:33:42 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:7115 helo=relay.sw.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNglm-0007sx-SZ for qemu-devel@nongnu.org; Thu, 14 Jul 2016 09:33:39 -0400 From: "Denis V. Lunev" Date: Thu, 14 Jul 2016 16:33:23 +0300 Message-Id: <1468503209-19498-3-git-send-email-den@openvz.org> In-Reply-To: <1468503209-19498-1-git-send-email-den@openvz.org> References: <1468503209-19498-1-git-send-email-den@openvz.org> Subject: [Qemu-devel] [PATCH v3 2/8] mirror: make sectors_in_flight int64_t List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org, qemu-devel@nongnu.org Cc: den@openvz.org, Stefan Hajnoczi , Kevin Wolf , Max Reitz , Jeff Cody We keep here the sum of int fields. Thus this could easily overflow, especially when we will start sending big requests in next patches. Signed-off-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Fam Zheng CC: Stefan Hajnoczi CC: Kevin Wolf CC: Max Reitz CC: Jeff Cody --- block/mirror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index 8d96049..9850e54 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -60,7 +60,7 @@ typedef struct MirrorBlockJob { unsigned long *in_flight_bitmap; int in_flight; - int sectors_in_flight; + int64_t sectors_in_flight; int ret; bool unmap; bool waiting_for_io; -- 2.5.0