diff options
| author | Fam Zheng | 2016-01-26 04:58:55 +0100 |
|---|---|---|
| committer | Max Reitz | 2016-02-02 17:50:47 +0100 |
| commit | d234c929310a322357ed4323c7014605449f5802 (patch) | |
| tree | fcd8f0c5a6e50f6c3f0c8a2c027cbadb5b14affa | |
| parent | qed: Assign bs->file->bs to file in bdrv_qed_co_get_block_status (diff) | |
| download | qemu-d234c929310a322357ed4323c7014605449f5802.tar.gz qemu-d234c929310a322357ed4323c7014605449f5802.tar.xz qemu-d234c929310a322357ed4323c7014605449f5802.zip | |
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 2ea05a6e28..a0098c1165 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; } |
