]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qemu-io-cmds.c
vhost-vsock: convert VMSTATE_VIRTIO_DEVICE
[mirror_qemu.git] / qemu-io-cmds.c
index 6e29edb1fd88b9c72a1939fbc2d2af10690a15f0..3a3838a079fb47f457463061066f9a6e84ba6ed6 100644 (file)
@@ -504,7 +504,7 @@ static int do_write_compressed(BlockBackend *blk, char *buf, int64_t offset,
         return -ERANGE;
     }
 
-    ret = blk_write_compressed(blk, offset >> 9, (uint8_t *)buf, count >> 9);
+    ret = blk_pwrite_compressed(blk, offset, buf, count);
     if (ret < 0) {
         return ret;
     }
@@ -1696,8 +1696,7 @@ static int discard_f(BlockBackend *blk, int argc, char **argv)
     }
 
     gettimeofday(&t1, NULL);
-    ret = blk_discard(blk, offset >> BDRV_SECTOR_BITS,
-                      count >> BDRV_SECTOR_BITS);
+    ret = blk_pdiscard(blk, offset, count);
     gettimeofday(&t2, NULL);
 
     if (ret < 0) {