qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] ISCSI: Readcapacity retruned the lba of the last se


From: Ronnie Sahlberg
Subject: [Qemu-devel] [PATCH] ISCSI: Readcapacity retruned the lba of the last sector. Total number of sectors is one more.
Date: Fri, 4 May 2012 18:15:44 +1000

Thanks to Paolo for spotting.

Signed-off-by: Ronnie Sahlberg <address@hidden>
---
 block/iscsi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/block/iscsi.c b/block/iscsi.c
index eb49093..7c1970d 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -482,7 +482,7 @@ iscsi_readcapacity16_cb(struct iscsi_context *iscsi, int 
status,
 
     itask->iscsilun->block_size = rc16->block_length;
     itask->iscsilun->num_blocks = rc16->returned_lba;
-    itask->bs->total_sectors    = rc16->returned_lba *
+    itask->bs->total_sectors    = (rc16->returned_lba + 1) *
                                rc16->block_length / BDRV_SECTOR_SIZE ;
 
     itask->status   = 0;
-- 
1.7.3.1




reply via email to

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