All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
	Kevin Wolf <kwolf@redhat.com>, John Snow <jsnow@redhat.com>
Subject: [Qemu-devel] [RFC for-3.0 4/4] block/qcow2-rust: Register block driver
Date: Tue, 18 Apr 2017 15:58:30 -0000	[thread overview]
Message-ID: <20170401155751.14322-5-mreitz@redhat.com> (raw)
In-Reply-To: <20170401155751.14322-1-mreitz@redhat.com>

The rust qcow2 driver is now actually MUCH BETTER than the LEGACY
CROOKED qcow2 driver, so let's not beat around the bush and just
register it as a block driver. Has always been my opinion, never said
anything different. The QEMU project will deal with the C issue in a
decisive way. Q.M.U.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 block/Makefile.objs |  1 +
 block/qcow2-rust.c  | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+)
 create mode 100644 block/qcow2-rust.c

diff --git a/block/Makefile.objs b/block/Makefile.objs
index de96f8ee80..4802946e4e 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -24,6 +24,7 @@ block-obj-y += accounting.o dirty-bitmap.o
 block-obj-y += write-threshold.o
 block-obj-y += backup.o
 block-obj-$(CONFIG_REPLICATION) += replication.o
+block-obj-y += qcow2-rust.o
 
 block-obj-y += crypto.o
 
diff --git a/block/qcow2-rust.c b/block/qcow2-rust.c
new file mode 100644
index 0000000000..1465fa9fe1
--- /dev/null
+++ b/block/qcow2-rust.c
@@ -0,0 +1,38 @@
+/* C basis of the Rust qcow2 block driver
+ *
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "qemu/osdep.h"
+#include "block/block_int.h"
+#include "qapi/error.h"
+#include "qemu/option.h"
+
+
+/* This is just for the module loading system to detect this driver */
+static BlockDriver _ __attribute__((used)) = {
+    .format_name = "qcow2-rust",
+};
+
+
+extern void bdrv_qcow2_rust_init(void);
+
+block_init(bdrv_qcow2_rust_init);
-- 
2.12.2

  parent reply	other threads:[~2017-04-18 15:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18 15:58 [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver Max Reitz
2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 2/4] block/qcow2-rust: " Max Reitz
2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 1/4] block: Add Rust interface Max Reitz
2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 3/4] block/qcow2-rust: Add partial write support Max Reitz
2017-04-18 15:58 ` Max Reitz [this message]
2017-04-19 11:28   ` [Qemu-devel] [RFC for-3.0 4/4] block/qcow2-rust: Register block driver Fam Zheng
2017-04-19 12:19     ` Max Reitz
2017-04-18 16:08 ` [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust " no-reply
2017-04-18 16:08 ` no-reply
2017-04-18 16:09 ` Marc-André Lureau
2017-04-18 16:12 ` no-reply
2017-04-21 15:51 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-04-22 16:42   ` Max Reitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170401155751.14322-5-mreitz@redhat.com \
    --to=mreitz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.