ae23c9
From 4ae2c1a9deaea0ed095bd960da92d87eda2eb70a Mon Sep 17 00:00:00 2001
ae23c9
From: John Snow <jsnow@redhat.com>
ae23c9
Date: Wed, 18 Jul 2018 22:55:05 +0200
ae23c9
Subject: [PATCH 247/268] docs/interop: add nbd.txt
ae23c9
ae23c9
RH-Author: John Snow <jsnow@redhat.com>
ae23c9
Message-id: <20180718225511.14878-30-jsnow@redhat.com>
ae23c9
Patchwork-id: 81416
ae23c9
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 29/35] docs/interop: add nbd.txt
ae23c9
Bugzilla: 1207657
ae23c9
RH-Acked-by: Eric Blake <eblake@redhat.com>
ae23c9
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
ae23c9
RH-Acked-by: Fam Zheng <famz@redhat.com>
ae23c9
ae23c9
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
ae23c9
ae23c9
Describe new metadata namespace: "qemu".
ae23c9
ae23c9
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
ae23c9
Message-Id: <20180609151758.17343-7-vsementsov@virtuozzo.com>
ae23c9
Reviewed-by: Eric Blake <eblake@redhat.com>
ae23c9
[eblake: grammar tweaks]
ae23c9
Signed-off-by: Eric Blake <eblake@redhat.com>
ae23c9
(cherry picked from commit 3229a835a3c574a8ebc605e007785c4e01c61623)
ae23c9
Signed-off-by: John Snow <jsnow@redhat.com>
ae23c9
ae23c9
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
ae23c9
---
ae23c9
 MAINTAINERS          |  1 +
ae23c9
 docs/interop/nbd.txt | 38 ++++++++++++++++++++++++++++++++++++++
ae23c9
 2 files changed, 39 insertions(+)
ae23c9
 create mode 100644 docs/interop/nbd.txt
ae23c9
ae23c9
diff --git a/MAINTAINERS b/MAINTAINERS
ae23c9
index a783c92..53d5216 100644
ae23c9
--- a/MAINTAINERS
ae23c9
+++ b/MAINTAINERS
ae23c9
@@ -1927,6 +1927,7 @@ F: nbd/
ae23c9
 F: include/block/nbd*
ae23c9
 F: qemu-nbd.*
ae23c9
 F: blockdev-nbd.c
ae23c9
+F: docs/interop/nbd.txt
ae23c9
 T: git git://repo.or.cz/qemu/ericb.git nbd
ae23c9
 
ae23c9
 NFS
ae23c9
diff --git a/docs/interop/nbd.txt b/docs/interop/nbd.txt
ae23c9
new file mode 100644
ae23c9
index 0000000..77b5f45
ae23c9
--- /dev/null
ae23c9
+++ b/docs/interop/nbd.txt
ae23c9
@@ -0,0 +1,38 @@
ae23c9
+Qemu supports the NBD protocol, and has an internal NBD client (see
ae23c9
+block/nbd.c), an internal NBD server (see blockdev-nbd.c), and an
ae23c9
+external NBD server tool (see qemu-nbd.c). The common code is placed
ae23c9
+in nbd/*.
ae23c9
+
ae23c9
+The NBD protocol is specified here:
ae23c9
+https://github.com/NetworkBlockDevice/nbd/blob/master/doc/proto.md
ae23c9
+
ae23c9
+The following paragraphs describe some specific properties of NBD
ae23c9
+protocol realization in Qemu.
ae23c9
+
ae23c9
+= Metadata namespaces =
ae23c9
+
ae23c9
+Qemu supports the "base:allocation" metadata context as defined in the
ae23c9
+NBD protocol specification, and also defines an additional metadata
ae23c9
+namespace "qemu".
ae23c9
+
ae23c9
+
ae23c9
+== "qemu" namespace ==
ae23c9
+
ae23c9
+The "qemu" namespace currently contains only one type of context,
ae23c9
+related to exposing the contents of a dirty bitmap alongside the
ae23c9
+associated disk contents.  That context has the following form:
ae23c9
+
ae23c9
+    qemu:dirty-bitmap:<dirty-bitmap-export-name>
ae23c9
+
ae23c9
+Each dirty-bitmap metadata context defines only one flag for extents
ae23c9
+in reply for NBD_CMD_BLOCK_STATUS:
ae23c9
+
ae23c9
+    bit 0: NBD_STATE_DIRTY, means that the extent is "dirty"
ae23c9
+
ae23c9
+For NBD_OPT_LIST_META_CONTEXT the following queries are supported
ae23c9
+in addition to "qemu:dirty-bitmap:<dirty-bitmap-export-name>":
ae23c9
+
ae23c9
+* "qemu:" - returns list of all available metadata contexts in the
ae23c9
+            namespace.
ae23c9
+* "qemu:dirty-bitmap:" - returns list of all available dirty-bitmap
ae23c9
+                         metadata contexts.
ae23c9
-- 
ae23c9
1.8.3.1
ae23c9