summaryrefslogtreecommitdiff
path: root/docs/interop
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2018-06-09 18:17:58 +0300
committerEric Blake <eblake@redhat.com>2018-06-21 09:23:59 -0500
commit3229a835a3c574a8ebc605e007785c4e01c61623 (patch)
treec74870b32b491a95681596b940f9c814cb430298 /docs/interop
parent767f0c7d6cddedbc97ad700bd1e0229cc2ce5eb5 (diff)
docs/interop: add nbd.txt
Describe new metadata namespace: "qemu". Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20180609151758.17343-7-vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> [eblake: grammar tweaks] Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'docs/interop')
-rw-r--r--docs/interop/nbd.txt38
1 files changed, 38 insertions, 0 deletions
diff --git a/docs/interop/nbd.txt b/docs/interop/nbd.txt
new file mode 100644
index 0000000000..77b5f45911
--- /dev/null
+++ b/docs/interop/nbd.txt
@@ -0,0 +1,38 @@
+Qemu supports the NBD protocol, and has an internal NBD client (see
+block/nbd.c), an internal NBD server (see blockdev-nbd.c), and an
+external NBD server tool (see qemu-nbd.c). The common code is placed
+in nbd/*.
+
+The NBD protocol is specified here:
+https://github.com/NetworkBlockDevice/nbd/blob/master/doc/proto.md
+
+The following paragraphs describe some specific properties of NBD
+protocol realization in Qemu.
+
+= Metadata namespaces =
+
+Qemu supports the "base:allocation" metadata context as defined in the
+NBD protocol specification, and also defines an additional metadata
+namespace "qemu".
+
+
+== "qemu" namespace ==
+
+The "qemu" namespace currently contains only one type of context,
+related to exposing the contents of a dirty bitmap alongside the
+associated disk contents. That context has the following form:
+
+ qemu:dirty-bitmap:<dirty-bitmap-export-name>
+
+Each dirty-bitmap metadata context defines only one flag for extents
+in reply for NBD_CMD_BLOCK_STATUS:
+
+ bit 0: NBD_STATE_DIRTY, means that the extent is "dirty"
+
+For NBD_OPT_LIST_META_CONTEXT the following queries are supported
+in addition to "qemu:dirty-bitmap:<dirty-bitmap-export-name>":
+
+* "qemu:" - returns list of all available metadata contexts in the
+ namespace.
+* "qemu:dirty-bitmap:" - returns list of all available dirty-bitmap
+ metadata contexts.