aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/qcow.c5
-rw-r--r--block/qcow2.c3
-rw-r--r--block/vmdk.c2
3 files changed, 9 insertions, 1 deletions
diff --git a/block/qcow.c b/block/qcow.c
index 577bd70..d56d24a 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -549,7 +549,10 @@ qcow_co_block_status(BlockDriverState *bs, bool want_zero,
if (!cluster_offset) {
return 0;
}
- if ((cluster_offset & QCOW_OFLAG_COMPRESSED) || s->crypto) {
+ if (cluster_offset & QCOW_OFLAG_COMPRESSED) {
+ return BDRV_BLOCK_DATA | BDRV_BLOCK_COMPRESSED;
+ }
+ if (s->crypto) {
return BDRV_BLOCK_DATA;
}
*map = cluster_offset | index_in_cluster;
diff --git a/block/qcow2.c b/block/qcow2.c
index 071004b..af43d59d 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -2162,6 +2162,9 @@ qcow2_co_block_status(BlockDriverState *bs, bool want_zero, int64_t offset,
{
status |= BDRV_BLOCK_RECURSE;
}
+ if (type == QCOW2_SUBCLUSTER_COMPRESSED) {
+ status |= BDRV_BLOCK_COMPRESSED;
+ }
return status;
}
diff --git a/block/vmdk.c b/block/vmdk.c
index 78baa04..e90649c 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1783,6 +1783,8 @@ vmdk_co_block_status(BlockDriverState *bs, bool want_zero,
if (extent->flat) {
ret |= BDRV_BLOCK_RECURSE;
}
+ } else {
+ ret |= BDRV_BLOCK_COMPRESSED;
}
*file = extent->file->bs;
break;