[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 2/4] block/rbd: code movement
From: |
Jeff Cody |
Subject: |
[Qemu-block] [PATCH 2/4] block/rbd: code movement |
Date: |
Mon, 27 Feb 2017 02:30:39 -0500 |
Signed-off-by: Jeff Cody <address@hidden>
---
block/rbd.c | 64 +++++++++++++++++++++++++++++++++++++++++++------------------
1 file changed, 45 insertions(+), 19 deletions(-)
diff --git a/block/rbd.c b/block/rbd.c
index 3f1a9de..c8d4eb1 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -357,6 +357,51 @@ static void qemu_rbd_memset(RADOSCB *rcb, int64_t offs)
}
}
+static QemuOptsList runtime_opts = {
+ .name = "rbd",
+ .head = QTAILQ_HEAD_INITIALIZER(runtime_opts.head),
+ .desc = {
+ {
+ .name = "filename",
+ .type = QEMU_OPT_STRING,
+ .help = "Specification of the rbd image",
+ },
+ {
+ .name = "password-secret",
+ .type = QEMU_OPT_STRING,
+ .help = "ID of secret providing the password",
+ },
+ {
+ .name = "conf",
+ .type = QEMU_OPT_STRING,
+ },
+ {
+ .name = "pool",
+ .type = QEMU_OPT_STRING,
+ },
+ {
+ .name = "image",
+ .type = QEMU_OPT_STRING,
+ },
+ {
+ .name = "snapshot",
+ .type = QEMU_OPT_STRING,
+ },
+ {
+ /* you might be tempted to call this 'id' to match
+ * the ceph documentation, but then it'll get gobbled
+ * up in the block layer before it gets to the image driver */
+ .name = "rbd-id",
+ .type = QEMU_OPT_STRING,
+ },
+ {
+ .name = "keyvalue-pairs",
+ .type = QEMU_OPT_STRING,
+ },
+ { /* end of list */ }
+ },
+};
+
static int qemu_rbd_create(const char *filename, QemuOpts *opts, Error **errp)
{
Error *local_err = NULL;
@@ -500,25 +545,6 @@ static void qemu_rbd_complete_aio(RADOSCB *rcb)
qemu_aio_unref(acb);
}
-/* TODO Convert to fine grained options */
-static QemuOptsList runtime_opts = {
- .name = "rbd",
- .head = QTAILQ_HEAD_INITIALIZER(runtime_opts.head),
- .desc = {
- {
- .name = "filename",
- .type = QEMU_OPT_STRING,
- .help = "Specification of the rbd image",
- },
- {
- .name = "password-secret",
- .type = QEMU_OPT_STRING,
- .help = "ID of secret providing the password",
- },
- { /* end of list */ }
- },
-};
-
static int qemu_rbd_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
--
2.9.3
- Re: [Qemu-block] [PATCH 4/4] block/rbd: Add blockdev-add support, (continued)
Re: [Qemu-block] [PATCH 4/4] block/rbd: Add blockdev-add support, Daniel P. Berrange, 2017/02/27
[Qemu-block] [PATCH 1/4] block/rbd: don't copy strings in qemu_rbd_next_tok(), Jeff Cody, 2017/02/27
[Qemu-block] [PATCH 2/4] block/rbd: code movement,
Jeff Cody <=
[Qemu-block] [PATCH 3/4] block/rbd: parse all options via bdrv_parse_filename, Jeff Cody, 2017/02/27