search for: handle_fail

Displaying 9 results from an estimated 9 matches for "handle_fail".

Did you mean: handle_mail
2020 Feb 12
2
[nbdkit PATCH] server: Correct logic when filter fails .prepare
...ble-1.16 server/backend.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/backend.c b/server/backend.c index 8bfa8525..753f5cca 100644 --- a/server/backend.c +++ b/server/backend.c @@ -221,15 +221,13 @@ backend_finalize (struct backend *b) if (h->state & HANDLE_FAILED) return -1; - if (h->handle) { - assert (h->state & HANDLE_CONNECTED); + assert (h->state & HANDLE_OPEN); + if (h->state & HANDLE_CONNECTED) { if (b->finalize (b, h->handle) == -1) { h->state |= HANDLE_FAILED; return -1; } }...
2019 Oct 07
0
[nbdkit PATCH 5/5] server: Ensure .finalize and .close are called as needed
...end_function) (struct connection *, typedef void (*connection_close_function) (struct connection *) __attribute__((__nonnull__ (1))); +enum { + HANDLE_OPEN = 1, /* Set if .open passed, so .close is needed */ + HANDLE_CONNECTED = 2, /* Set if .prepare passed, so .finalize is needed */ + HANDLE_FAILED = 4, /* Set if .finalize failed */ +}; + struct b_conn_handle { void *handle; + unsigned char state; /* Bitmask of HANDLE_* values */ + uint64_t exportsize; int can_write; int can_flush; @@ -173,6 +181,7 @@ static inline void reset_b_conn_handle (struct b_conn_handle *h) {...
2019 Oct 07
6
[nbdkit PATCH 0/5] More retry fixes
I think this is my last round of patches for issues I identified with the retry filter. With this in place, it should be safe to interject another filter in between retry and the plugin. Eric Blake (5): retry: Don't call into closed plugin tests: Refactor test-retry-reopen-fail.sh tests: Enhance retry test to cover failed reopen server: Move prepare/finalize/close recursion to
2020 Feb 12
0
[PATCH nbdkit 2/3] server: Rename ‘struct b_conn_handle’ to plain ‘struct handle’.
...ugin, and get_handle (conn, b->i) to return the struct handle for + * the i'th backend (if b->i >= 1 then for a filter). + */ enum { HANDLE_OPEN = 1, /* Set if .open passed, so .close is needed */ HANDLE_CONNECTED = 2, /* Set if .prepare passed, so .finalize is needed */ HANDLE_FAILED = 4, /* Set if .finalize failed */ }; -struct b_conn_handle { - void *handle; +struct handle { + void *handle; /* Plugin or filter handle. */ - unsigned char state; /* Bitmask of HANDLE_* values */ + unsigned char state; /* Bitmask of HANDLE_* values */ uint64_t exportsi...
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 12
5
[PATCH nbdkit 1/3] server: Rename global backend pointer to "top".
It's confusing to use the same terminology for a single backend as for the linked list of backends. In particular it's often not clear if we're calling the next backend or the whole chain of backends. --- server/internal.h | 14 ++++++++++-- server/connections.c | 20 ++++++++--------- server/locks.c | 2 +- server/main.c
2020 Feb 11
0
[PATCH nbdkit 3/3] server: Remove explicit connection parameter, use TLS instead.
...ing from the @@ -220,7 +223,7 @@ backend_finalize (struct backend *b, struct connection *conn) if (h->handle) { assert (h->state & HANDLE_CONNECTED); - if (b->finalize (b, conn, h->handle) == -1) { + if (b->finalize (b, h->handle) == -1) { h->state |= HANDLE_FAILED; return -1; } @@ -229,13 +232,14 @@ backend_finalize (struct backend *b, struct connection *conn) assert (! (h->state & HANDLE_CONNECTED)); if (b->i) - return backend_finalize (b->next, conn); + return backend_finalize (b->next); return 0; } void...
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 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.