qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qed: make qed_alloc_clusters round up offset to


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] qed: make qed_alloc_clusters round up offset to nearest cluster
Date: Tue, 16 Aug 2011 17:22:43 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]