block.h (7e0019a7196ebed177c95824875cf852e1a6f667) block.h (e24d813b29d3a478a9309078487efc8ce8599f22)
1#ifndef BLOCK_H
2#define BLOCK_H
3
4#include "block/aio.h"
5#include "qapi-types.h"
6#include "qemu/iov.h"
7#include "qemu/coroutine.h"
8#include "block/accounting.h"

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

22 int64_t vm_state_offset;
23 bool is_dirty;
24 /*
25 * True if unallocated blocks read back as zeroes. This is equivalent
26 * to the LBPRZ flag in the SCSI logical block provisioning page.
27 */
28 bool unallocated_blocks_are_zero;
29 /*
1#ifndef BLOCK_H
2#define BLOCK_H
3
4#include "block/aio.h"
5#include "qapi-types.h"
6#include "qemu/iov.h"
7#include "qemu/coroutine.h"
8#include "block/accounting.h"

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

22 int64_t vm_state_offset;
23 bool is_dirty;
24 /*
25 * True if unallocated blocks read back as zeroes. This is equivalent
26 * to the LBPRZ flag in the SCSI logical block provisioning page.
27 */
28 bool unallocated_blocks_are_zero;
29 /*
30 * True if the driver can optimize writing zeroes by unmapping
31 * sectors. This is equivalent to the BLKDISCARDZEROES ioctl in Linux
32 * with the difference that in qemu a discard is allowed to silently
33 * fail. Therefore we have to use bdrv_pwrite_zeroes with the
34 * BDRV_REQ_MAY_UNMAP flag for an optimized zero write with unmapping.
35 * After this call the driver has to guarantee that the contents read
36 * back as zero. It is additionally required that the block device is
37 * opened with BDRV_O_UNMAP flag for this to work.
38 */
39 bool can_write_zeroes_with_unmap;
40 /*
41 * True if this block driver only supports compressed writes
42 */
43 bool needs_compressed_writes;
44} BlockDriverInfo;
45
46typedef struct BlockFragInfo {
47 uint64_t allocated_clusters;
48 uint64_t total_clusters;

--- 594 unchanged lines hidden ---
30 * True if this block driver only supports compressed writes
31 */
32 bool needs_compressed_writes;
33} BlockDriverInfo;
34
35typedef struct BlockFragInfo {
36 uint64_t allocated_clusters;
37 uint64_t total_clusters;

--- 594 unchanged lines hidden ---