From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an624-0002P8-PH for qemu-devel@nongnu.org; Mon, 04 Apr 2016 11:03:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1an621-0002nw-Hv for qemu-devel@nongnu.org; Mon, 04 Apr 2016 11:03:12 -0400 Received: from mail-am1on0107.outbound.protection.outlook.com ([157.56.112.107]:14913 helo=emea01-am1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an620-0002nT-WB for qemu-devel@nongnu.org; Mon, 04 Apr 2016 11:03:09 -0400 References: <1459779314-12266-1-git-send-email-eblake@redhat.com> From: "Denis V. Lunev" Message-ID: <57027E8D.7060902@openvz.org> Date: Mon, 4 Apr 2016 17:47:41 +0300 MIME-Version: 1.0 In-Reply-To: <1459779314-12266-1-git-send-email-eblake@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] doc: Allow NBD_CMD_FLAG_NO_HOLE during NBD_CMD_WRITE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , nbd-general@lists.sourceforge.net Cc: qemu-devel@nongnu.org, alex@alex.org.uk, pborzenkov@virtuozzo.com On 04/04/2016 05:15 PM, Eric Blake wrote: > qemu already has an existing server implementation option that will > explicitly search the payload of NBD_CMD_WRITE for large blocks of > zeroes, and punch holes in the underlying file. For old clients > that don't know how to use the new NBD_CMD_WRITE_ZEROES, this is a > workaround to keep the server's destination file approximately as > sparse as the client's source. However, for new clients that know > how to explicitly request holes, it is unnecessary overhead; and > can lead to the server punching a hole and risking fragmentation or > future ENOSPC even when the client explicitly wanted to write > zeroes rather than a hole. So it makes sense to let the new > NBD_CMD_FLAG_NO_HOLE work for WRITE as well as WRITE_ZEROES. > > Signed-off-by: Eric Blake what behaviour do you expect for QCOW2 file? We should fully provision that image as far as I could understand, i.e. allocate data blocks with zero content. I think that this would work.