On Tue, Aug 16, 2011 at 12:22 PM, Stefan Hajnoczi <stefa...@gmail.com> wrote:
> On Mon, Aug 15, 2011 at 07:16:10PM -0400, Devin Nakamura wrote:
>> @@ -263,6 +263,8 @@ static int qed_read_string(BlockDriverState *file,
>> uint64_t offset, size_t n,
>> */
>> static uint64_t qed_alloc_clusters(BDRVQEDState *s, unsigned int n)
>> {
>> + s->file_size = qed_start_of_cluster(s, s->file_size +
>> + s->header.cluster_size - 1);
>
> Why do you need this? QED cluster aligns the file size on open.
> file_size should always be cluster-aligned.
>
> Stefan
>
I was running into problems when I was doing in-place conversion from
qcow2. But I suppose I could cluster align the file offset when I open
the conversion target. I just seemed this way was safer.