Displaying 10 results from an estimated 10 matches for "nbdplug_can_writ".
Did you mean:
nbdplug_can_write
2019 Aug 06
1
Re: [PATCH libnbd 1/3] api: Change nbd_read_only -> nbd_is_read_only.
...git i/plugins/nbd/nbd.c w/plugins/nbd/nbd.c
index f11e54d5..a83ded5e 100644
--- i/plugins/nbd/nbd.c
+++ w/plugins/nbd/nbd.c
@@ -566,11 +566,15 @@ nbdplug_get_size (void *handle)
return size;
}
+#ifndef LIBNBD_HAVE_NBD_IS_READ_ONLY
+# define nbd_is_read_only nbd_read_only
+#endif
+
static int
nbdplug_can_write (void *handle)
{
struct handle *h = handle;
- int i = nbd_read_only (h->nbd);
+ int i = nbd_is_read_only (h->nbd);
if (i == -1) {
nbdkit_error ("failure to check readonly flag: %s", nbd_get_error ());
--
Eric Blake, Principal Software Engineer
Red Hat, Inc....
2019 Aug 15
3
[nbdkit PATCH] nbd: Another libnbd version bump
...->nbd, export) == -1)
goto err;
- if (nbd_add_meta_context (h->nbd, "base:allocation") == -1)
+ if (nbd_add_meta_context (h->nbd, LIBNBD_CONTEXT_BASE_ALLOCATION) == -1)
goto err;
if (nbd_set_tls (h->nbd, tls) == -1)
goto err;
@@ -570,7 +572,7 @@ static int
nbdplug_can_write (void *handle)
{
struct handle *h = handle;
- int i = nbd_read_only (h->nbd);
+ int i = nbd_is_read_only (h->nbd);
if (i == -1) {
nbdkit_error ("failure to check readonly flag: %s", nbd_get_error ());
@@ -674,7 +676,7 @@ static int
nbdplug_can_extents (void *handle)...
2019 Aug 06
5
[PATCH libnbd 0/3] One API and small documentation changes.
One API change, some small documentation changes.
2020 Aug 28
4
[nbdkit PATCH 0/3] .list_exports in nbd plugin
Another series on top of my exportname filter, marking off another
todo bullet point. With this, you can now use the NBD plugin as a
transparent passthrough of all export names served by the remote
server in both directions (list advertisement server to client, and
export name from client to server).
Eric Blake (3):
nbd: Implement .default_export, .export_description
nbd: Add
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
...static int64_t
nbdplug_get_size (void *handle)
{
struct handle *h = handle;
+ int64_t size = nbd_get_size (h->nbd);
- return h->size;
+ if (size == -1) {
+ nbdkit_error ("failure to get size: %s", nbd_get_error ());
+ return -1;
+ }
+ return size;
}
static int
nbdplug_can_write (void *handle)
{
struct handle *h = handle;
+ int i = nbd_read_only (h->nbd);
- return !(h->flags & NBD_FLAG_READ_ONLY);
+ if (i == -1) {
+ nbdkit_error ("failure to check readonly flag: %s", nbd_get_error ());
+ return -1;
+ }
+ return !(i || h->readonly);...
2019 Jun 12
0
[nbdkit PATCH v3 3/5] nbd: Use libnbd 0.1.3+
...static int64_t
nbdplug_get_size (void *handle)
{
struct handle *h = handle;
+ int64_t size = nbd_get_size (h->nbd);
- return h->size;
+ if (size == -1) {
+ nbdkit_error ("failure to get size: %s", nbd_get_error ());
+ return -1;
+ }
+ return size;
}
static int
nbdplug_can_write (void *handle)
{
struct handle *h = handle;
+ int i = nbd_read_only (h->nbd);
- return !(h->flags & NBD_FLAG_READ_ONLY);
+ if (i == -1) {
+ nbdkit_error ("failure to check readonly flag: %s", nbd_get_error ());
+ return -1;
+ }
+ return !(i || h->readonly);...
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 Sep 21
18
[nbdkit PATCH v3 00/14] exportname filter
It's been several weeks since I posted v2 (I got distracted by
improving libnbd to better test things, which in turn surfaced some
major memory leak problems in nbdsh that are now fixed). Many of the
patches are minor rebases from v2, with the biggest changes being
fallout from:
- patch 2: rename nbdkit_add_default_export to nbdkit_use_default_export
- overall: this missed 1.22, so update