From 3399833f1412e72e6f9e6997775dfdf12d624eaf Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Tue, 26 Jan 2016 11:58:52 +0800 Subject: iscsi: Assign bs to file in iscsi_co_get_block_status Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Message-id: 1453780743-16806-6-git-send-email-famz@redhat.com Signed-off-by: Max Reitz --- block/iscsi.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'block/iscsi.c') diff --git a/block/iscsi.c b/block/iscsi.c index e182557..9fe76f4 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -625,6 +625,9 @@ out: if (iTask.task != NULL) { scsi_free_scsi_task(iTask.task); } + if (ret > 0 && ret & BDRV_BLOCK_OFFSET_VALID) { + *file = bs; + } return ret; } -- cgit v1.1