Displaying 16 results from an estimated 16 matches for "backend_unload".
2019 Aug 30
0
[nbdkit PATCH v2 2/2] server: Remember .open(readonly) status
...ugins.c | 2 --
5 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/server/internal.h b/server/internal.h
index a55d6406..fb197b9e 100644
--- a/server/internal.h
+++ b/server/internal.h
@@ -325,6 +325,9 @@ extern void backend_load (struct backend *b, const char *name,
extern void backend_unload (struct backend *b, void (*unload) (void))
__attribute__((__nonnull__ (1)));
+extern int backend_open (struct backend *b, struct connection *conn,
+ int readonly)
+ __attribute__((__nonnull__ (1, 2)));
extern void backend_set_handle (struct backend *b, struct connectio...
2019 Aug 30
0
[nbdkit PATCH 2/9] server: Consolidate common backend tasks into new backend.c
...index,
+ const char *filename, void *dl, const char *type)
+ __attribute__((__nonnull__ (1, 4, 5, 6)));
+extern void backend_set_name (struct backend *b, const char *name,
+ const char *type)
+ __attribute__((__nonnull__ (1, 3)));
+extern void backend_unload (struct backend *b, void (*unload) (void))
+ __attribute__((__nonnull__ (1)));
+
/* plugins.c */
extern struct backend *plugin_register (size_t index, const char *filename,
void *dl, struct nbdkit_plugin *(*plugin_init) (void))
diff --git a/server/Makefil...
2019 Aug 30
3
[nbdkit PATCH v2 0/2] caching .can_write
This is a subset of the last half of the larger 9-patch series. The
uncontroversial first half of that series is pushed, but here, I tried
to reduce the size of the patches by splitting out some of the more
complex changes, so that the rest of the changes remaining in the
series are more mechanical. In turn, it forced me to write timing
tests, which let me spot another spot where we are wasting
2019 Aug 30
0
[nbdkit PATCH 9/9] server: Move command validation from protocol.c to backend.c
...++++++++++++++++++++++++
server/protocol.c | 134 ++++++++++------------------------------------
2 files changed, 121 insertions(+), 107 deletions(-)
diff --git a/server/backend.c b/server/backend.c
index e785a824..cd678f96 100644
--- a/server/backend.c
+++ b/server/backend.c
@@ -124,6 +124,43 @@ backend_unload (struct backend *b, void (*unload) (void))
free (b->name);
}
+static bool
+writes_blocked (struct backend *b, struct connection *conn, const char *cmd,
+ uint32_t flags)
+{
+ struct b_conn_handle *h = &conn->handles[b->i];
+
+ assert (h->can_write >= 0);
+...
2019 Aug 30
15
[nbdkit PATCH 0/9] can_FOO caching, more filter validation
It's easy to use the sh script to demonstrate that nbdkit is
inefficiently calling into .get_size, .can_fua, and friends more than
necessary. We've also commented on the list in the past that it would
be nice to ensure that when filters call into next_ops, they are not
violating constraints (as we've have to fix several bugs in the past
where we did not have such checking to protect
2020 Jul 31
6
[RFC nbdkit PATCH 0/4] Progress towards .list_exports
This takes Rich's API proposal and starts fleshing it out with enough
meat that I was able to test 'nbdkit eval' advertising multiple
exports with descriptions paired with 'qemu-nbd --list'.
Eric Blake (3):
server: Add exports list functions
server: Prepare to use export list from plugin
sh, eval: Add .list_exports support
Richard W.M. Jones (1):
server: Implement
2020 Jul 21
4
[PATCH nbdkit] server: Pass the export name through filter .open calls.
...adonly, const char *exportname);
int (*prepare) (struct backend *, void *handle, int readonly);
int (*finalize) (struct backend *, void *handle);
void (*close) (struct backend *, void *handle);
@@ -402,8 +404,13 @@ extern void backend_load (struct backend *b, const char *name,
extern void backend_unload (struct backend *b, void (*unload) (void))
__attribute__((__nonnull__ (1)));
-extern int backend_open (struct backend *b, int readonly)
- __attribute__((__nonnull__ (1)));
+/* exportname is only valid for this call and almost certainly will be
+ * freed on return of this function, so backends...
2020 Aug 25
0
[nbdkit PATCH 1/5] api: Add .default_export
...ports *exports);
+ const char *(*default_export) (struct backend *, int readonly, int is_tls);
void *(*open) (struct backend *, int readonly, const char *exportname,
int is_tls);
int (*prepare) (struct backend *, void *handle, int readonly);
@@ -413,9 +414,11 @@ extern void backend_unload (struct backend *b, void (*unload) (void))
__attribute__((__nonnull__ (1)));
extern int backend_list_exports (struct backend *b, int readonly,
- int default_only,
+ int ignored,
struct nbdkit_expo...
2020 Aug 06
6
[nbdkit PATCH v2 0/5] .list_exports
Since v1:
- patch 1: check size limits
- patch 2: better handling of default export name canonicalization
- patch 3: support filters as well as plugins
- patch 4: new
- patch 5: rewrite sh parser, fix testsuite to actually work and
cover more cases (now that libnbd.git is fixed)
Eric Blake (4):
server: Add exports list functions
server: Prepare to use export list from plugin
log: Add
2019 Dec 12
9
[PATCH nbdkit 0/7] server: Allow datapath debug messages to be suppressed.
The immediate reason for this patch is to reduce the amount of
debugging in virt-v2v with using the virt-v2v -v option (because this
implies running nbdkit in verbose mode too). Most of the messages are
datapath ones about pread/pwrite requests, and in fact as we've added
more filters on top of nbdkit these messages have got more and more
verbose. However they are not particularly
2020 Feb 11
0
[PATCH nbdkit 3/3] server: Remove explicit connection parameter, use TLS instead.
...nt (*cache) (struct backend *, struct connection *conn, void *handle,
+ int (*cache) (struct backend *, void *handle,
uint32_t count, uint64_t offset, uint32_t flags, int *err);
};
@@ -382,72 +365,70 @@ extern void backend_load (struct backend *b, const char *name,
extern void backend_unload (struct backend *b, void (*unload) (void))
__attribute__((__nonnull__ (1)));
-extern int backend_open (struct backend *b, struct connection *conn,
- int readonly)
- __attribute__((__nonnull__ (1, 2)));
-extern int backend_prepare (struct backend *b, struct connection *...
2020 Feb 11
4
[PATCH nbdkit v2 0/3] server: Remove explicit connection parameter.
v1 was here:
https://www.redhat.com/archives/libguestfs/2020-February/msg00081.html
v2 replaces
struct connection *conn = GET_CONN;
with
GET_CONN;
which sets conn implicitly and asserts that it is non-NULL.
If we actually want to test if conn is non-NULL or behave
differently, then you must use threadlocal_get_conn() instead,
and some existing uses do that.
Rich.
2020 Aug 27
10
[nbdkit PATCH v2 0/8] exportname filter
This is a revision of my .default_export work, plus new work on
.export_descriptions and a new exportname filter. I think it is
now ready to check in.
Things I'd still like in 1.22:
- the file plugin should implement .list_exports (patch already posted,
but it needs rebasing on this series)
- the ext2 filter should override .list_exports when in exportname mode
- the nbd plugin should be
2020 Feb 11
5
[PATCH nbdkit 0/3] server: Remove explicit connection parameter.
The third patch is a large but mechanical change which gets rid of
passing around struct connection * entirely within the server,
preferring instead to reference the connection through thread-local
storage.
I hope this is a gateway to simplifying other parts of the code.
Rich.
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
2020 Aug 25
9
[nbdkit PATCH 0/5] Implement .default_export, nbdkit_string_intern
More patches on the way for improving .list_exports signature and
adding .export_description, but this is the promised code showing
why nbdkit_string_intern is useful. Patch 4 is somewhat RFC: we
could either add new API to take the boilerplate from:
foo_config(const char *key, const char *value) {
if (strcmp (key, "file") == 0) {
CLEANUP_FREE char *tmp = nbdkit_realpath (value);