From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akwK0-0000NG-E2 for qemu-devel@nongnu.org; Tue, 29 Mar 2016 12:16:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akwJu-0002z0-TJ for qemu-devel@nongnu.org; Tue, 29 Mar 2016 12:16:48 -0400 Date: Tue, 29 Mar 2016 18:16:34 +0200 From: Kevin Wolf Message-ID: <20160329161633.GH4600@noname.redhat.com> References: <1458858840-3859-1-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1458858840-3859-1-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 0/4] qemu-img: Fix preallocation with -S 0 for convert List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Fam Zheng , qemu-devel@nongnu.org, qemu-block@nongnu.org Am 24.03.2016 um 23:33 hat Max Reitz geschrieben: > Using -S 0 is supposed to allocate everything in the output image; or at > least it is supposed to always explicitly write zeros even if the area > in question is known to only contain zeros. That doesn't always work > right now, so this series fixes it (patch 1, to be specific). > > I only noticed after I had written the test added by patch 4 that we > already had an -S 0 test case which is included in the iotest 122. > However, the test added here works for all image formats and is maybe > more of a direct test (instead of querying the format whether it thinks > it allocated all of the data we directly ask du whether everything has > been allocated) so maybe it reflects better what users expect -S 0 to > do. Maybe. > > Patches 2 and 3 are required for the test. I could have written the test > without doing a convert with null-co as the source, but that would have > been boring, so I did not. > > If you want to argue that in light of the existence of test 122 the new > test added here is unnecessary and we therefore do not need patches 2, 3 > and 4, please go ahead. I won't put up too much of a fight. Thanks, applied to the block branch. Kevin