summary refs log tree commit diff stats
path: root/hw/i2c/omap_i2c.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2013-06-25 18:15:18 +0100
committerKevin Wolf <kwolf@redhat.com>2013-06-28 09:20:27 +0200
commit0b3f21e6a99c025c829d342ee417f317fe2e03b2 (patch)
treed3c0f60d84e2990f74af296af8b6f752a3c1ad74 /hw/i2c/omap_i2c.c
parentf59fee8d509b446df24843c1145a99b740492725 (diff)
downloadfocaccia-qemu-0b3f21e6a99c025c829d342ee417f317fe2e03b2.tar.gz
focaccia-qemu-0b3f21e6a99c025c829d342ee417f317fe2e03b2.zip
block/ssh: Set bdrv_has_zero_init according to the file type.
If the remote is a regular file, set it to true (ie. reads of
uninitialized areas in a newly created file will return zeroes).
If we can't prove that, return false (a safe default).

Tested by adding a debugging print statement [not part of this commit]
and creating a remote file and a remote block device:

  $ ./qemu-img create ssh://localhost/tmp/new 100M
  Formatting 'ssh://localhost/tmp/new', fmt=raw size=104857600
  filename ssh://localhost/tmp/new: has_zero_init = 1
  $ sudo lvcreate -L 1G -n tmp /dev/fedora
    Logical volume "tmp" created
  $ ./qemu-img create ssh://localhost/dev/fedora/tmp 1G
  Formatting 'ssh://localhost/dev/fedora/tmp', fmt=raw size=1073741824
  filename ssh://localhost/dev/fedora/tmp: has_zero_init = 0

Cc: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/i2c/omap_i2c.c')
0 files changed, 0 insertions, 0 deletions