qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qed: make qed_alloc_clusters round up offset to nearest cluster
@ 2011-08-15 23:16 Devin Nakamura
  2011-08-16 16:22 ` Stefan Hajnoczi
  2011-08-23 12:38 ` Kevin Wolf
  0 siblings, 2 replies; 6+ messages in thread
From: Devin Nakamura @ 2011-08-15 23:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, Devin Nakamura


Signed-off-by: Devin Nakamura <devin122@gmail.com>
---
 block/qed.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/block/qed.c b/block/qed.c
index 333f067..9a1e49c 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -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);
     uint64_t offset = s->file_size;
     s->file_size += n * s->header.cluster_size;
     return offset;
-- 
1.7.6.rc1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-25 22:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-15 23:16 [Qemu-devel] [PATCH] qed: make qed_alloc_clusters round up offset to nearest cluster Devin Nakamura
2011-08-16 16:22 ` Stefan Hajnoczi
     [not found]   ` <CAJ1AwB5v8V-KMz7YK9xYuyXn6jWN+H23dXCn5EV1hsuS3iqgnQ@mail.gmail.com>
2011-08-16 18:03     ` Devin Nakamura
2011-08-23 12:38 ` Kevin Wolf
2011-08-25  9:33   ` Stefan Hajnoczi
2011-08-25 22:14     ` Devin Nakamura

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).