[Top][All Lists]

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

[Qemu-devel] [PULL 10/20] block: fixed BdrvTrackedRequest filling in bdr

From: Stefan Hajnoczi
Subject: [Qemu-devel] [PULL 10/20] block: fixed BdrvTrackedRequest filling in bdrv_co_discard
Date: Mon, 20 Jun 2016 15:05:21 +0100

From: "Denis V. Lunev" <address@hidden>

The request area is specified in bytes, not in sectors.

Signed-off-by: Denis V. Lunev <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy<address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
CC: Stefan Hajnoczi <address@hidden>
CC: Kevin Wolf <address@hidden>
CC: Max Reitz <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
 block/io.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/io.c b/block/io.c
index ebdb9d8..3527d91 100644
--- a/block/io.c
+++ b/block/io.c
@@ -2347,8 +2347,8 @@ int coroutine_fn bdrv_co_discard(BlockDriverState *bs, 
int64_t sector_num,
         return 0;
-    tracked_request_begin(&req, bs, sector_num, nb_sectors,
-                          BDRV_TRACKED_DISCARD);
+    tracked_request_begin(&req, bs, sector_num << BDRV_SECTOR_BITS,
+                          nb_sectors << BDRV_SECTOR_BITS, 
     bdrv_set_dirty(bs, sector_num, nb_sectors);
     max_discard = MIN_NON_ZERO(bs->bl.max_discard, BDRV_REQUEST_MAX_SECTORS);

reply via email to

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