Skip to content

Commit

Permalink
sheepdog: Assign bs to file in sd_co_get_block_status
Browse files Browse the repository at this point in the history
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 1453780743-16806-9-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
  • Loading branch information
Fam Zheng authored and XanClic committed Feb 2, 2016
1 parent 53f1dfd commit d234c92
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions block/sheepdog.c
Expand Up @@ -2739,6 +2739,9 @@ sd_co_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors,
if (*pnum > nb_sectors) {
*pnum = nb_sectors;
}
if (ret > 0 && ret & BDRV_BLOCK_OFFSET_VALID) {
*file = bs;
}
return ret;
}

Expand Down

0 comments on commit d234c92

Please sign in to comment.