1Qemu supports the NBD protocol, and has an internal NBD client (see 2block/nbd.c), an internal NBD server (see blockdev-nbd.c), and an 3external NBD server tool (see qemu-nbd.c). The common code is placed 4in nbd/*. 5 6The NBD protocol is specified here: 7https://github.com/NetworkBlockDevice/nbd/blob/master/doc/proto.md 8 9The following paragraphs describe some specific properties of NBD 10protocol realization in Qemu. 11 12= Metadata namespaces = 13 14Qemu supports the "base:allocation" metadata context as defined in the 15NBD protocol specification, and also defines an additional metadata 16namespace "qemu". 17 18 19== "qemu" namespace == 20 21The "qemu" namespace currently contains only one type of context, 22related to exposing the contents of a dirty bitmap alongside the 23associated disk contents. That context has the following form: 24 25 qemu:dirty-bitmap:<dirty-bitmap-export-name> 26 27Each dirty-bitmap metadata context defines only one flag for extents 28in reply for NBD_CMD_BLOCK_STATUS: 29 30 bit 0: NBD_STATE_DIRTY, means that the extent is "dirty" 31 32For NBD_OPT_LIST_META_CONTEXT the following queries are supported 33in addition to "qemu:dirty-bitmap:<dirty-bitmap-export-name>": 34 35* "qemu:" - returns list of all available metadata contexts in the 36 namespace. 37* "qemu:dirty-bitmap:" - returns list of all available dirty-bitmap 38 metadata contexts. 39