|
|
9ae3a8 |
From e02cdc5fccb977bde5162af586a8cc4dcaf7c5f4 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Date: Fri, 17 Jan 2014 03:07:46 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 03/34] vvfat: use bdrv_new() to allocate BlockDriverState
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1389928083-8921-2-git-send-email-famz@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 56763
|
|
|
9ae3a8 |
O-Subject: [RHEL-7 qemu-kvm PATCH 01/18] vvfat: use bdrv_new() to allocate BlockDriverState
|
|
|
9ae3a8 |
Bugzilla: 1041301
|
|
|
9ae3a8 |
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
we need bdrv_new() to properly initialize BDS, don't allocate memory
|
|
|
9ae3a8 |
manually.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit 3d34c6cd99f434126365150c2535bbf93b94f891)
|
|
|
9ae3a8 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block/vvfat.c | 2 +-
|
|
|
9ae3a8 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block/vvfat.c | 2 +-
|
|
|
9ae3a8 |
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/block/vvfat.c b/block/vvfat.c
|
|
|
9ae3a8 |
index cb45687..2c7970d 100644
|
|
|
9ae3a8 |
--- a/block/vvfat.c
|
|
|
9ae3a8 |
+++ b/block/vvfat.c
|
|
|
9ae3a8 |
@@ -2951,7 +2951,7 @@ static int enable_write_target(BDRVVVFATState *s)
|
|
|
9ae3a8 |
unlink(s->qcow_filename);
|
|
|
9ae3a8 |
#endif
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- s->bs->backing_hd = calloc(sizeof(BlockDriverState), 1);
|
|
|
9ae3a8 |
+ s->bs->backing_hd = bdrv_new("");
|
|
|
9ae3a8 |
s->bs->backing_hd->drv = &vvfat_write_target;
|
|
|
9ae3a8 |
s->bs->backing_hd->opaque = g_malloc(sizeof(void*));
|
|
|
9ae3a8 |
*(void**)s->bs->backing_hd->opaque = s;
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|