Displaying 12 results from an estimated 12 matches for "nbdplug_pread".
2020 Feb 10
1
[nbdkit PATCH 10/10] plugins: Wire up nbd plugin support for NBD_INFO_INIT_STATE
...BNBD_HAVE_NBD_GET_INIT_FLAGS
+ i = nbd_get_init_flags (h->nbd);
+
+ if (i == -1) {
+ nbdkit_error ("failure to check init flags: %s", nbd_get_error ());
+ return -1;
+ }
+ i = !!(i & LIBNBD_INIT_ZERO);
+#endif
+ return i;
+}
+
/* Read data from the file. */
static int
nbdplug_pread (void *handle, void *buf, uint32_t count, uint64_t offset,
@@ -860,6 +896,8 @@ static struct nbdkit_plugin plugin = {
.can_multi_conn = nbdplug_can_multi_conn,
.can_extents = nbdplug_can_extents,
.can_cache = nbdplug_can_cache,
+ .init_sparse = nbdplug_init_spar...
2019 Jul 17
3
[nbdkit PATCH 0/2] Another libnbd API bump
libnbd 0.1.7 was released today, which breaks compilation of
nbdkit-nbd-plugin. We could work around it by using #ifdef
LIBNBD_HAVE_XXX to learn about the renamed functions, but supporting
older versions is not all that important when we don't yet have API
stability. So patch 1 copes by just bumping the minimum version
instead, except that we have yet another pending libnbd patch with an
API
2019 Jul 17
0
[nbdkit PATCH 2/2] nbd: Another libnbd API bump
...libnbd >= 0.1.8 not found, nbd plugin will be crippled])])
])
AM_CONDITIONAL([HAVE_LIBNBD], [test "x$LIBNBD_LIBS" != "x"])
diff --git a/plugins/nbd/nbd.c b/plugins/nbd/nbd.c
index 48873d09..83a30583 100644
--- a/plugins/nbd/nbd.c
+++ b/plugins/nbd/nbd.c
@@ -673,7 +673,7 @@ nbdplug_pread (void *handle, void *buf, uint32_t count, uint64_t offset,
assert (!flags);
nbdplug_prepare (&s);
nbdplug_register (h, &s, nbd_aio_pread_callback (h->nbd, buf, count, offset,
- &s, nbdplug_notify, 0));
+...
2019 Jul 01
3
[nbdkit PATCH 0/2] Use new libnbd _notify functions
I'm not observing any noticeable performance differences, but I'm
liking the diffstat. I can't push this patch until we release a new
libnbd version with the _notify API addition, but am posting it now
for playing with things.
Eric Blake (2):
nbd: Move transaction info from heap to stack
nbd: Use nbdkit aio_*_notify variants
plugins/nbd/nbd.c | 217
2019 Jul 01
0
[nbdkit PATCH 2/2] nbd: Use nbdkit aio_*_notify variants
...;);
- pthread_mutex_destroy (&h->trans_lock);
goto err;
}
@@ -562,7 +518,6 @@ nbdplug_close_handle (struct handle *h)
close (h->fds[0]);
close (h->fds[1]);
nbd_close (h->nbd);
- pthread_mutex_destroy (&h->trans_lock);
free (h);
}
@@ -717,7 +672,8 @@ nbdplug_pread (void *handle, void *buf, uint32_t count, uint64_t offset,
assert (!flags);
nbdplug_prepare (&s);
- nbdplug_register (h, &s, nbd_aio_pread (h->nbd, buf, count, offset, 0));
+ nbdplug_register (h, &s, nbd_aio_pread_notify (h->nbd, buf, count, offset,
+...
2019 Aug 15
3
[nbdkit PATCH] nbd: Another libnbd version bump
...t handle *h = handle;
- int i = nbd_can_meta_context (h->nbd, "base:allocation");
+ int i = nbd_can_meta_context (h->nbd, LIBNBD_CONTEXT_BASE_ALLOCATION);
if (i == -1) {
nbdkit_error ("failure to check extents ability: %s", nbd_get_error ());
@@ -693,8 +695,8 @@ nbdplug_pread (void *handle, void *buf, uint32_t count, uint64_t offset,
assert (!flags);
nbdplug_prepare (&s);
- nbdplug_register (h, &s, nbd_aio_pread_callback (h->nbd, buf, count, offset,
- nbdplug_notify, &s, 0));
+ nbdplug_register (h...
2019 May 30
5
[nbdkit PATCH 0/4] Play with libnbd for nbdkit-add
Patch 1 played with an early draft of Rich's Fedora 30 libnbd package:
https://bugzilla.redhat.com/show_bug.cgi?id=1713767#c17
Note that comment 21 provides a newer package 0.1.1-1 with a different
API; and that libnbd has more unreleased API changes in the pipeline
(whether that will be called 0.2 or 0.1.2); so we'll have to tweak
things based on what is actually available in distros.
2019 Jun 02
5
[nbdkit PATCH v2 0/5] Play with libnbd for nbdkit-nbd
libnbd-0.1.2-1 is now available in Fedora 29/30 updates-testing,
although it was not compiled against libxml2 so it lacks uri support
(I ended up testing patch 4 with a self-built libnbd).
Diffs since v1 - rebase to master, bump from libnbd 0.1 to 0.1.2, add
URI support, better timing results
Still not done - patch 5 needs associated tests
Eric Blake (5):
nbd: Check for libnbd
nbd:
2019 May 30
0
[nbdkit PATCH 3/4] nbd: Use libnbd 0.1
...e;
+ int i = nbd_can_meta_context (h->nbd, "base:allocation");
- return h->extents;
+ if (i == -1) {
+ nbdkit_error ("failure to check extents ability: %s", nbd_get_error ());
+ return -1;
+ }
+ return i;
}
/* Read data from the file. */
@@ -1242,7 +617,8 @@ nbdplug_pread (void *handle, void *buf, uint32_t count, uint64_t offset,
struct transaction *s;
assert (!flags);
- s = nbdplug_request_full (h, 0, NBD_CMD_READ, offset, count, NULL, buf, NULL);
+ /* XXX API changes in libnbd 0.1.2: */
+ s = nbdplug_register (h, nbd_aio_pread (h->nbd, buf, count, off...
2019 Jun 12
0
[nbdkit PATCH v3 3/5] nbd: Use libnbd 0.1.3+
...e;
+ int i = nbd_can_meta_context (h->nbd, "base:allocation");
- return h->extents;
+ if (i == -1) {
+ nbdkit_error ("failure to check extents ability: %s", nbd_get_error ());
+ return -1;
+ }
+ return i;
}
/* Read data from the file. */
@@ -1247,7 +605,7 @@ nbdplug_pread (void *handle, void *buf, uint32_t count, uint64_t offset,
struct transaction *s;
assert (!flags);
- s = nbdplug_request_full (h, 0, NBD_CMD_READ, offset, count, NULL, buf, NULL);
+ s = nbdplug_register (h, nbd_aio_pread (h->nbd, buf, count, offset, 0));
return nbdplug_reply (h, s);...
2019 Jun 12
8
[nbdkit PATCH v3 0/5] Play with libnbd for nbdkit-nbd
libnbd-0.1.4-1 is now available in Fedora 29/30 updates testing.
Diffs since v2 - rebase to master, bump from libnbd 0.1.2 to 0.1.3+,
add tests to TLS usage which flushed out the need to turn relative
pathnames into absolute, doc tweaks
Now that the testsuite covers TLS and libnbd has been fixed to provide
the things I found lacking when developing v2, I'm leaning towards
pushing this on
2020 Feb 10
17
Cross-project NBD extension proposal: NBD_INFO_INIT_STATE
I will be following up to this email with four separate threads each
addressed to the appropriate single list, with proposed changes to:
- the NBD protocol
- qemu: both server and client
- libnbd: client
- nbdkit: server
The feature in question adds a new optional NBD_INFO_ packet to the
NBD_OPT_GO portion of handshake, adding up to 16 bits of information
that the server can advertise to the