qemu/include/block
Peter Lieven 3ac216270a block: change default of .has_zero_init to 0
.has_zero_init defaults to 1 for all formats and protocols.

this is a dangerous default since this means that all
new added drivers need to manually overwrite it to 0 if
they do not ensure that a device is zero initialized
after bdrv_create().

if a driver needs to explicitly set this value to
1 its easier to verify the correctness in the review process.

during review of the existing drivers it turned out
that ssh and gluster had a wrong default of 1.
both protocols support host_devices as backend
which are not by default zero initialized. this
wrong assumption will lead to possible corruption
if qemu-img convert is used to write to such a backend.

vpc and vmdk also defaulted to 1 altough they support
fixed respectively flat extends. this has to be addresses
in separate patches. both formats as well as the mentioned
ssh and gluster are turned to the default of 0 with this
patch for safety.

a similar problem with the wrong default existed for
iscsi most likely because the driver developer did
oversee the default value of 1.

Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-06-28 13:52:35 +02:00
..
aio.h aio: add a ThreadPool instance to AioContext 2013-03-15 16:07:50 +01:00
block_int.h block: add basic backup support to block driver 2013-06-28 09:20:26 +02:00
block.h block: change default of .has_zero_init to 0 2013-06-28 13:52:35 +02:00
blockjob.h
coroutine_int.h coroutine: stop using AioContext in CoQueue 2013-05-24 16:17:56 +02:00
coroutine.h rdma: export yield_until_fd_readable() 2013-06-27 02:38:36 +02:00
nbd.h nbd: support large NBD requests 2013-05-03 13:05:49 +02:00
qapi.h qmp: add ImageInfo in BlockDeviceInfo used by query-block 2013-06-07 13:37:45 +02:00
scsi.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
snapshot.h block: move snapshot code in block.c to block/snapshot.c 2013-06-04 13:56:30 +02:00
thread-pool.h threadpool: drop global thread pool 2013-03-15 16:07:51 +01:00