qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/6] QED block conversion
@ 2011-09-12 14:47 Devin Nakamura
  2011-09-12 14:47 ` [Qemu-devel] [PATCH 1/6] qed: add qed_find_cluster_sync() Devin Nakamura
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Devin Nakamura @ 2011-09-12 14:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, Devin Nakamura

This patch series adds support for block conversion to the qed driver.
This depends on my precivious block conversion api series
Devin Nakamura (6):
  qed: add qed_find_cluster_sync()
  qed: add bdrv_qed_get_conversion_options()
  qed: add open_conversion_target()
  qed: add qed_bdrv_get_mapping()
  qed: add bdrv_qed_map()
  qed: add bdrv_qed_copy_header()

 block/qed-cluster.c |   33 +++++++++++
 block/qed.c         |  161 +++++++++++++++++++++++++++++++++++++++++++++++++++
 block/qed.h         |    4 +
 3 files changed, 198 insertions(+), 0 deletions(-)

-- 
1.7.6.rc1

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [Qemu-devel] [PATCH 2/6] qed: add bdrv_qed_get_conversion_options()
@ 2011-09-12 15:00 Devin Nakamura
  0 siblings, 0 replies; 11+ messages in thread
From: Devin Nakamura @ 2011-09-12 15:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, Devin Nakamura


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

diff --git a/block/qed.c b/block/qed.c
index 624e261..16320f5 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -1444,6 +1444,18 @@ static int bdrv_qed_check(BlockDriverState *bs, BdrvCheckResult *result)
     return qed_check(s, result, false);
 }
 
+static int bdrv_qed_get_conversion_options(BlockDriverState *bs,
+                                           BlockConversionOptions *options)
+{
+    BDRVQEDState* s = bs->opaque;
+
+    options->encryption_type = 0;
+    options->cluster_size = s->header.cluster_size;
+    options->image_size = s->header.image_size;
+    options->nb_snapshots = 0;
+    return 0;
+}
+
 static QEMUOptionParameter qed_create_options[] = {
     {
         .name = BLOCK_OPT_SIZE,
@@ -1490,6 +1502,7 @@ static BlockDriver bdrv_qed = {
     .bdrv_get_info            = bdrv_qed_get_info,
     .bdrv_change_backing_file = bdrv_qed_change_backing_file,
     .bdrv_check               = bdrv_qed_check,
+    .bdrv_get_conversion_options = bdrv_qed_get_conversion_options,
 };
 
 static void bdrv_qed_init(void)
-- 
1.7.6.rc1

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

end of thread, other threads:[~2011-09-21 12:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-12 14:47 [Qemu-devel] [PATCH 0/6] QED block conversion Devin Nakamura
2011-09-12 14:47 ` [Qemu-devel] [PATCH 1/6] qed: add qed_find_cluster_sync() Devin Nakamura
2011-09-21 12:45   ` Stefan Hajnoczi
2011-09-21 13:02     ` Kevin Wolf
2011-09-12 14:47 ` [Qemu-devel] [PATCH 2/6] qed: add bdrv_qed_get_conversion_options() Devin Nakamura
2011-09-12 14:47 ` [Qemu-devel] [PATCH 3/6] qed: add open_conversion_target() Devin Nakamura
2011-09-20  9:21   ` Kevin Wolf
2011-09-21 12:37   ` Stefan Hajnoczi
2011-09-20  8:38 ` [Qemu-devel] [PATCH 0/6] QED block conversion Kevin Wolf
2011-09-20  9:58   ` Stefan Hajnoczi
  -- strict thread matches above, loose matches on Subject: below --
2011-09-12 15:00 [Qemu-devel] [PATCH 2/6] qed: add bdrv_qed_get_conversion_options() 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).