qemu-e2k/include/block
Kevin Wolf 55880601d8 block: Add BDRV_O_RESIZE for blk_new_open()
blk_new_open() is a convenience function that processes flags rather
than QDict options as a simple way to just open an image file.

In order to keep it convenient in the future, it must automatically
request the necessary permissions. This can easily be inferred from the
flags for read and write, but we need another flag that tells us whether
to get the resize permission.

We can't just always request it because that means that no block jobs
can run on the resulting BlockBackend (which is something that e.g.
qemu-img commit wants to do), but we also can't request it never because
most of the .bdrv_create() implementations call blk_truncate().

The solution is to introduce another flag that is passed by all users
that want to resize the image.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
2017-02-28 20:40:36 +01:00
..
accounting.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
aio.h aio-posix: partially inline aio_dispatch into aio_poll 2017-02-21 11:39:39 +00:00
block.h block: Add BDRV_O_RESIZE for blk_new_open() 2017-02-28 20:40:36 +01:00
block_backup.h Backup: export interfaces for extra serialization 2016-09-13 11:00:56 +01:00
block_int.h vvfat: Implement .bdrv_child_perm() 2017-02-28 20:40:36 +01:00
blockjob.h blockjob: add block_job_start 2016-11-14 22:47:34 -05:00
blockjob_int.h blockjob: add .start field 2016-11-14 22:47:34 -05:00
dirty-bitmap.h block: More operations for meta dirty bitmap 2016-10-24 17:56:07 +02:00
nbd.h nbd: Implement NBD_CMD_WRITE_ZEROES on server 2016-11-02 09:28:56 +01:00
qapi.h block/qapi: Use blk_enable_write_cache() 2016-03-30 12:16:02 +02:00
raw-aio.h linux-aio: share one LinuxAioState within an AioContext 2016-07-18 15:09:31 +01:00
scsi.h * SCSI scanner support 2016-07-14 13:44:06 +01:00
snapshot.h include: Clean up includes 2016-02-23 12:43:05 +00:00
thread-pool.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
throttle-groups.h block: Move I/O throttling configuration functions to BlockBackend 2016-05-19 16:45:30 +02:00
write-threshold.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00