Displaying 13 results from an estimated 13 matches for "nbdplug_extent".
Did you mean:
nbdplug_extents
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
...(&s);
nbdplug_register (h, &s, nbd_aio_flush_callback (h->nbd,
- &s, nbdplug_notify, 0));
+ nbdplug_notify, &s, 0));
return nbdplug_reply (h, &s);
}
@@ -777,8 +777,9 @@ nbdplug_extents (void *handle, uint32_t count, uint64_t offset,
nbdplug_prepare (&s);
s.extents = extents;
nbdplug_register (h, &s, nbd_aio_block_status_callback (h->nbd, count, offset,
- &s, nbdplug_extent,
-...
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 Aug 15
3
[nbdkit PATCH] nbd: Another libnbd version bump
...nbdplug_prepare (&s);
- nbdplug_register (h, &s, nbd_aio_flush_callback (h->nbd,
- nbdplug_notify, &s, 0));
+ nbdplug_register (h, &s, nbd_aio_flush (h->nbd, s.cb, 0));
return nbdplug_reply (h, &s);
}
static int
-nbdplug_extent (unsigned valid_flag, void *opaque,
- const char *metacontext, uint64_t offset,
+nbdplug_extent (void *opaque, const char *metacontext, uint64_t offset,
uint32_t *entries, size_t nr_entries, int *error)
{
- struct transaction *trans = opaque;
- struct nbdkit_exten...
2019 Jul 01
0
[nbdkit PATCH 2/2] nbd: Use nbdkit aio_*_notify variants
...);
nbdplug_prepare (&s);
- nbdplug_register (h, &s, nbd_aio_flush (h->nbd, 0));
+ nbdplug_register (h, &s, nbd_aio_flush_notify (h->nbd,
+ &s, nbdplug_notify, 0));
return nbdplug_reply (h, &s);
}
@@ -816,8 +776,9 @@ nbdplug_extents (void *handle, uint32_t count, uint64_t offset,
assert (!(flags & ~NBDKIT_FLAG_REQ_ONE));
nbdplug_prepare (&s);
s.extents = extents;
- nbdplug_register (h, &s, nbd_aio_block_status (h->nbd, count, offset,
- &s, nbdplug_ex...
2019 Jun 27
1
[nbdkit PATCH] nbd: Update for libnbd 0.1.5
...(h, s);
}
+/* XXX: Hack this signature to compile to 0.1.3 (minimum configure
+ * version) as well as 0.1.5 (API change, with witness of the addition
+ * of pread_structured at the same release). Once configure requires a
+ * higher minimum version, the #if hack can be dropped.
+ */
static int
nbdplug_extent (void *opaque, const char *metacontext, uint64_t offset,
- uint32_t *entries, size_t nr_entries)
+ uint32_t *entries, size_t nr_entries
+#if LIBNBD_HAVE_NBD_PREAD_STRUCTURED
+ , int *error
+#endif
+ )
{
struct nbdkit_extents *extents =...
2019 May 30
0
[nbdkit PATCH 3/4] nbd: Use libnbd 0.1
...@@ nbdplug_flush (void *handle, uint32_t flags)
struct transaction *s;
assert (!flags);
- s = nbdplug_request (h, 0, NBD_CMD_FLUSH, 0, 0);
+ /* XXX API changes in libnbd 0.1.2: */
+ s = nbdplug_register (h, nbd_aio_flush (h->nbd /* , f */));
return nbdplug_reply (h, s);
}
+struct nbdplug_extent_data
+{
+ struct nbdkit_extents *extents;
+ int err;
+};
+
+static void
+nbdplug_extent (void *opaque, const char *metacontext, uint64_t offset,
+ uint32_t *entries, size_t nr_entries)
+{
+ struct nbdplug_extent_data *data = opaque;
+
+ assert (strcmp (metacontext, "base:all...
2019 Jun 12
0
[nbdkit PATCH v3 3/5] nbd: Use libnbd 0.1.3+
...bdplug_reply (h, s);
}
@@ -1305,10 +662,29 @@ nbdplug_flush (void *handle, uint32_t flags)
struct transaction *s;
assert (!flags);
- s = nbdplug_request (h, 0, NBD_CMD_FLUSH, 0, 0);
+ s = nbdplug_register (h, nbd_aio_flush (h->nbd, 0));
return nbdplug_reply (h, s);
}
+static int
+nbdplug_extent (void *opaque, const char *metacontext, uint64_t offset,
+ uint32_t *entries, size_t nr_entries)
+{
+ struct nbdkit_extents *extents = opaque;
+
+ assert (strcmp (metacontext, "base:allocation") == 0);
+ assert (nr_entries % 2 == 0);
+ while (nr_entries) {
+ /* We re...
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 Aug 02
0
[nbdkit PATCH v2 10/17] plugins: Add .fork_safe field
...fork_safe = 1, /* no use of fork() */
};
NBDKIT_REGISTER_PLUGIN (plugin)
diff --git a/plugins/nbd/nbd.c b/plugins/nbd/nbd.c
index 95d910e7..7762c9c0 100644
--- a/plugins/nbd/nbd.c
+++ b/plugins/nbd/nbd.c
@@ -861,6 +861,7 @@ static struct nbdkit_plugin plugin = {
.extents = nbdplug_extents,
.cache = nbdplug_cache,
.errno_is_preserved = 1,
+ .fork_safe = 1, /* libnbd uses fork() but not for URIs */
};
NBDKIT_REGISTER_PLUGIN (plugin)
diff --git a/plugins/null/null.c b/plugins/null/null.c
index 647624ba..3e7161b7 100644
--- a/plugins/null/null.c
+++ b/pl...
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
2019 Aug 02
23
[nbdkit PATCH v2 00/17] fd leak safety
This is a major rewrite compared to my v1 series, where I've tried
a lot harder to ensure that we still accommodate building on Haiku
(although I have not actually yet fired up a Haiku VM to try it
for myself). I also managed to make the sh plugin fully parallel,
on capable platforms.
See also my question on patch 10 on whether I've picked the best
naming convention.
Eric Blake (17):