From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mciub-0000ui-Ib for qemu-devel@nongnu.org; Sun, 16 Aug 2009 12:48:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MciuW-0000uE-Qh for qemu-devel@nongnu.org; Sun, 16 Aug 2009 12:48:52 -0400 Received: from [199.232.76.173] (port=46552 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MciuW-0000uB-Mj for qemu-devel@nongnu.org; Sun, 16 Aug 2009 12:48:48 -0400 Received: from mail2.shareable.org ([80.68.89.115]:38521) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MciuW-000668-B4 for qemu-devel@nongnu.org; Sun, 16 Aug 2009 12:48:48 -0400 Date: Sun, 16 Aug 2009 17:48:42 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH] qcow2: Metadata preallocation Message-ID: <20090816164841.GA27122@shareable.org> References: <1250262015-996-1-git-send-email-kwolf@redhat.com> <4A87F44B.5080308@redhat.com> <5b31733c0908160512r25abf0d2ld45a3602a8c540fa@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5b31733c0908160512r25abf0d2ld45a3602a8c540fa@mail.gmail.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Filip Navara Cc: Kevin Wolf , Avi Kivity , qemu-devel@nongnu.org Filip Navara wrote: > FILE_ATTRIBUTE_SPARSE_FILE? You can't actually set it when > opening/creating the file, a separate call to > DeviceIoControl/FSCTL_SET_SPARSE is needed. I see that you increase the file size by writing zeros to the end. Can't you use the Windows equivalent of unix ftruncate() to extend the file instead, after FSCTL_SET_SPARSE? -- Jamie