qcow2.c (b3fc0af1ff5e922d4dd7c875394dbd26dc7313b4) qcow2.c (1bf6e9ca9234e1dbcaa18baa06eca9d55cc2dbbb)
1/*
2 * Block driver for the QCOW version 2 format
3 *
4 * Copyright (c) 2004-2006 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 4354 unchanged lines hidden (view full) ---

4363{
4364 BDRVQcow2State *s = bs->opaque;
4365 bdi->unallocated_blocks_are_zero = true;
4366 bdi->cluster_size = s->cluster_size;
4367 bdi->vm_state_offset = qcow2_vm_state_offset(s);
4368 return 0;
4369}
4370
1/*
2 * Block driver for the QCOW version 2 format
3 *
4 * Copyright (c) 2004-2006 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 4354 unchanged lines hidden (view full) ---

4363{
4364 BDRVQcow2State *s = bs->opaque;
4365 bdi->unallocated_blocks_are_zero = true;
4366 bdi->cluster_size = s->cluster_size;
4367 bdi->vm_state_offset = qcow2_vm_state_offset(s);
4368 return 0;
4369}
4370
4371static ImageInfoSpecific *qcow2_get_specific_info(BlockDriverState *bs)
4371static ImageInfoSpecific *qcow2_get_specific_info(BlockDriverState *bs,
4372 Error **errp)
4372{
4373 BDRVQcow2State *s = bs->opaque;
4374 ImageInfoSpecific *spec_info;
4375 QCryptoBlockInfo *encrypt_info = NULL;
4373{
4374 BDRVQcow2State *s = bs->opaque;
4375 ImageInfoSpecific *spec_info;
4376 QCryptoBlockInfo *encrypt_info = NULL;
4377 Error *local_err = NULL;
4376
4377 if (s->crypto != NULL) {
4378
4379 if (s->crypto != NULL) {
4378 encrypt_info = qcrypto_block_get_info(s->crypto, &error_abort);
4380 encrypt_info = qcrypto_block_get_info(s->crypto, &local_err);
4381 if (local_err) {
4382 error_propagate(errp, local_err);
4383 return NULL;
4384 }
4379 }
4380
4381 spec_info = g_new(ImageInfoSpecific, 1);
4382 *spec_info = (ImageInfoSpecific){
4383 .type = IMAGE_INFO_SPECIFIC_KIND_QCOW2,
4384 .u.qcow2.data = g_new(ImageInfoSpecificQCow2, 1),
4385 };
4386 if (s->qcow_version == 2) {

--- 598 unchanged lines hidden ---
4385 }
4386
4387 spec_info = g_new(ImageInfoSpecific, 1);
4388 *spec_info = (ImageInfoSpecific){
4389 .type = IMAGE_INFO_SPECIFIC_KIND_QCOW2,
4390 .u.qcow2.data = g_new(ImageInfoSpecificQCow2, 1),
4391 };
4392 if (s->qcow_version == 2) {

--- 598 unchanged lines hidden ---