search for: next_reopen

Displaying 11 results from an estimated 11 matches for "next_reopen".

Did you mean: next_open
2019 Sep 19
0
[PATCH nbdkit v2 2/4] filters: Implement next_ops .reopen call.
...t connection *conn) { diff --git a/server/filters.c b/server/filters.c index 1091c2d..78e32bc 100644 --- a/server/filters.c +++ b/server/filters.c @@ -237,6 +237,13 @@ filter_close (struct backend *b, struct connection *conn) * single ‘void *nxdata’ struct pointer (‘b_conn’). */ +static int +next_reopen (void *nxdata, int readonly) +{ + struct b_conn *b_conn = nxdata; + return backend_reopen (b_conn->b, b_conn->conn, readonly); +} + static int64_t next_get_size (void *nxdata) { @@ -373,6 +380,7 @@ next_cache (void *nxdata, uint32_t count, uint64_t offset, } static struct nbdkit_next...
2019 Sep 19
0
[PATCH nbdkit v3 1/3] filters: Implement next_ops .reopen call.
...t connection *conn) { diff --git a/server/filters.c b/server/filters.c index 1091c2d..78e32bc 100644 --- a/server/filters.c +++ b/server/filters.c @@ -237,6 +237,13 @@ filter_close (struct backend *b, struct connection *conn) * single ‘void *nxdata’ struct pointer (‘b_conn’). */ +static int +next_reopen (void *nxdata, int readonly) +{ + struct b_conn *b_conn = nxdata; + return backend_reopen (b_conn->b, b_conn->conn, readonly); +} + static int64_t next_get_size (void *nxdata) { @@ -373,6 +380,7 @@ next_cache (void *nxdata, uint32_t count, uint64_t offset, } static struct nbdkit_next...
2020 Feb 12
2
[nbdkit PATCH] filters: Remove most next_* wrappers
...handle); } -/* The next_functions structure contains pointers to backend - * functions. These are only needed for type safety (nxdata is void - * pointer, backend_* functions expect a struct backend * parameter). - * nxdata is a pointer to the next backend in the linked list. - */ - -static int -next_reopen (void *nxdata, int readonly) -{ - struct backend *b_next = nxdata; - return backend_reopen (b_next, readonly); -} - -static int64_t -next_get_size (void *nxdata) -{ - struct backend *b_next = nxdata; - return backend_get_size (b_next); -} - -static int -next_can_write (void *nxdata) -{ - struc...
2019 Sep 19
6
[PATCH nbdkit 0/2] Add new retry filter.
This is a retry filter implementation as outlined here: https://www.redhat.com/archives/libguestfs/2019-September/msg00167.html It is only lightly tested. One way to test it is to try an SSH copy (see the commit message for patch 2/2), and in the middle of the copy kill the per-connection sshd on the remote machine. You will see that the copy recovers after a few seconds. Add the nbdkit -v
2019 Sep 19
7
[PATCH nbdkit v2 0/4] Add new retry filter.
v1 was here: https://www.redhat.com/archives/libguestfs/2019-September/msg00199.html v2: - Adds a fairly simple yet comprehensive test using sh plugin. - Rebase and retest. Patch 1 is a misc patch not really related to the series. Rich.
2020 Feb 12
0
[PATCH nbdkit 3/3] server: filters: Remove struct b_h.
...he two parameters from a - * single ‘void *nxdata’ struct pointer (‘b_h’). + * functions. These are only needed for type safety (nxdata is void + * pointer, backend_* functions expect a struct backend * parameter). + * nxdata is a pointer to the next backend in the linked list. */ static int next_reopen (void *nxdata, int readonly) { - struct b_h *b_h = nxdata; - return backend_reopen (b_h->b, readonly); + struct backend *b_next = nxdata; + return backend_reopen (b_next, readonly); } static int64_t next_get_size (void *nxdata) { - struct b_h *b_h = nxdata; - return backend_get_size...
2019 Sep 19
7
[PATCH nbdkit v3 0/3] Add new retry filter.
v2 was here: https://www.redhat.com/archives/libguestfs/2019-September/msg00221.html I think this is more like "the one". It handles reopen failing correctly, and there is a second test for that. I also ran my sshd tests locally and it worked in all scenarios I could think up (except of course sshd not being available at the start, but we want that to fail). Rich.
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.
...n, we cannot call them directly, but must + * backend and a handle, we cannot call them directly, but must * write some next_* functions that unpack the two parameters from a - * single ‘void *nxdata’ struct pointer (‘b_conn’). + * single ‘void *nxdata’ struct pointer (‘b_h’). */ static int next_reopen (void *nxdata, int readonly) { - struct b_conn *b_conn = nxdata; - return backend_reopen (b_conn->b, b_conn->conn, readonly); + struct b_h *b_h = nxdata; + return backend_reopen (b_h->b, readonly); } static int64_t next_get_size (void *nxdata) { - struct b_conn *b_conn = nxdata...
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.