Displaying 2 results from an estimated 2 matches for "6665cd9".
2019 May 25
3
[RFC nbdkit PATCH 0/2] Add 'nbdkit nbd shared=1' mode
I got annoyed by qemu-nbd's default of only allowing a single
connection; combine that with nbdkit's nbd plugin, and even 'qemu-nbd
--list' of nbdkit counts as the single connection and immediately
hangs up. If we introduce a shared mode, then 'qemu-nbd --list' can
connect as many times as it wants without killing the original
qemu-nbd wrapped by nbdkit. But this in turn
2019 May 25
0
[nbdkit PATCH 2/2] nbd: Add shared=true parameter
...+ nbdkit --exit-with-parent --filter=partition nbd socket=$sock \
+ shared=1 retry=5 partition=1 &
exec qemu-nbd -k $sock -f qcow2 /path/to/image.qcow2 )
Conversely, expose the contents of export I<foo> from a new style
diff --git a/plugins/nbd/nbd.c b/plugins/nbd/nbd.c
index 6665cd9..9389a55 100644
--- a/plugins/nbd/nbd.c
+++ b/plugins/nbd/nbd.c
@@ -57,6 +57,37 @@
#include "byte-swapping.h"
#include "cleanup.h"
+/* The per-transaction details */
+struct transaction {
+ uint64_t cookie;
+ sem_t sem;
+ void *buf;
+ uint64_t offset;
+ uint32_t count;
+...