From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPfGD-0008QC-I5 for qemu-devel@nongnu.org; Tue, 19 Jul 2016 20:21:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPfGC-0000oD-Ku for qemu-devel@nongnu.org; Tue, 19 Jul 2016 20:21:13 -0400 From: Jeff Cody Date: Tue, 19 Jul 2016 20:20:50 -0400 Message-Id: <1468974062-7726-3-git-send-email-jcody@redhat.com> In-Reply-To: <1468974062-7726-1-git-send-email-jcody@redhat.com> References: <1468974062-7726-1-git-send-email-jcody@redhat.com> Subject: [Qemu-devel] [PULL 02/14] mirror: make sectors_in_flight int64_t List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: peter.maydell@linaro.org, jcody@redhat.com, qemu-devel@nongnu.org From: "Denis V. Lunev" 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 Message-id: 1468503209-19498-3-git-send-email-den@openvz.org CC: Stefan Hajnoczi CC: Kevin Wolf CC: Max Reitz CC: Jeff Cody Signed-off-by: Jeff Cody --- block/mirror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index b1e633e..fbacee2 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; -- 1.9.3