diff options
author | Fam Zheng <famz@redhat.com> | 2016-01-26 11:58:55 +0800 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:30:23 -0600 |
commit | 172ff1e85c92d2b0dfb8c1336b83342fd3dce8a5 (patch) | |
tree | 499298021d36766f0f54f5643b2b5aeeb1482dd3 | |
parent | a7635c9d7210ea349dbaf74c98959a1d711c5f94 (diff) | |
download | hqemu-172ff1e85c92d2b0dfb8c1336b83342fd3dce8a5.zip hqemu-172ff1e85c92d2b0dfb8c1336b83342fd3dce8a5.tar.gz |
sheepdog: Assign bs to file in sd_co_get_block_status
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>
-rw-r--r-- | block/sheepdog.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c index 2ea05a6..a0098c1 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -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; } |