[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block/ssh: Set bdrv_has_zero_init according to
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH] block/ssh: Set bdrv_has_zero_init according to the file type. |
Date: |
Wed, 26 Jun 2013 09:39:50 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 25.06.2013 um 19:15 hat Richard W.M. Jones geschrieben:
> From: "Richard W.M. Jones" <address@hidden>
>
> 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 <address@hidden>
> Signed-off-by: Richard W.M. Jones <address@hidden>
Thanks, applied to the block branch, and CCed qemu-stable.
Kevin