From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrkKY-0002PF-4o for qemu-devel@nongnu.org; Wed, 26 Jun 2013 03:39:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrkKW-0004Hr-Vr for qemu-devel@nongnu.org; Wed, 26 Jun 2013 03:39:54 -0400 Date: Wed, 26 Jun 2013 09:39:50 +0200 From: Kevin Wolf Message-ID: <20130626073949.GB2720@dhcp-200-207.str.redhat.com> References: <1372180518-26888-1-git-send-email-rjones@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1372180518-26888-1-git-send-email-rjones@redhat.com> Subject: Re: [Qemu-devel] [PATCH] block/ssh: Set bdrv_has_zero_init according to the file type. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: qemu-devel@nongnu.org, qemu-stable@nongnu.org Am 25.06.2013 um 19:15 hat Richard W.M. Jones geschrieben: > From: "Richard W.M. Jones" > > 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 > Signed-off-by: Richard W.M. Jones Thanks, applied to the block branch, and CCed qemu-stable. Kevin