int instance_size;
int (*bdrv_probe)(const uint8_t *buf, int buf_size, const char *filename);
int (*bdrv_probe_device)(const char *filename);
- int (*bdrv_open)(BlockDriverState *bs, const char *filename, int flags);
+ int (*bdrv_open)(BlockDriverState *bs, int flags);
+ int (*bdrv_file_open)(BlockDriverState *bs, const char *filename, int flags);
int (*bdrv_read)(BlockDriverState *bs, int64_t sector_num,
uint8_t *buf, int nb_sectors);
int (*bdrv_write)(BlockDriverState *bs, int64_t sector_num,
/* Set if newly created images are not guaranteed to contain only zeros */
int no_zero_init;
- struct BlockDriver *next;
+ QLIST_ENTRY(BlockDriver) list;
};
struct BlockDriverState {
int media_changed;
BlockDriverState *backing_hd;
+ BlockDriverState *file;
+
/* async read/write emulation */
void *sync_aiocb;
uint64_t wr_bytes;
uint64_t rd_ops;
uint64_t wr_ops;
+ uint64_t wr_highest_sector;
/* Whether the disk can expand beyond total_sectors */
int growable;