similar to: [PATCH nbdkit] server: Pass the export name through filter .open calls.

Displaying 20 results from an estimated 3000 matches similar to: "[PATCH nbdkit] server: Pass the export name through filter .open calls."

2020 Jul 22
0
Re: [PATCH nbdkit] server: Pass the export name through filter .open calls.
On 7/21/20 3:47 PM, Richard W.M. Jones wrote: > To allow filters to modify the export name as it passes through the > layers this commit makes several changes: > > The filter .open callback now takes an extra parameter, the export > name. This is always non-NULL (for oldstyle it is ""). This string > has a short lifetime and filters that need to hang on to it must
2020 Jul 22
1
Re: [PATCH nbdkit] server: Pass the export name through filter .open calls.
On Tue, Jul 21, 2020 at 07:41:21PM -0500, Eric Blake wrote: > On 7/21/20 3:47 PM, Richard W.M. Jones wrote: > >+++ b/server/plugins.c > >@@ -278,12 +278,30 @@ plugin_preconnect (struct backend *b, int readonly) > > } > > static void * > >-plugin_open (struct backend *b, int readonly) > >+plugin_open (struct backend *b, int readonly, const char *exportname)
2020 Jul 22
1
Re: [PATCH nbdkit] server: Pass the export name through filter .open calls.
On 7/21/20 7:41 PM, Eric Blake wrote: >> @@ -148,7 +166,7 @@ ext2_prepare (struct nbdkit_next_ops *next_ops, >> void *nxdata, void *handle, >>     struct ext2_inode inode; >>     int64_t r; >>     CLEANUP_FREE char *name = NULL; >> -  const char *fname = file ?: nbdkit_export_name (); >> +  const char *fname = file ?: h->exportname; > > Hmm -
2020 Aug 07
0
[nbdkit PATCH 1/3] server: Implement nbdkit_is_tls for use during .open
Now that we can differentiate content based on export name, we also need to be able to differentiate content for a --tls=on server, since TLS is optional according to whether the client has authenticated. For internal code and filters, this means adding a new parameter; the sh plugin can do likewise. For plugins, we can't add a parameter until the V3 protocol, so in the meantime, we add
2020 Aug 25
0
[nbdkit PATCH 1/5] api: Add .default_export
I'm about to add an 'exportname' filter, and in the process, I noticed a few shortcomings in our API. Time to fix those before the 1.22 release locks our API in stone. Overloading .list_exports in order to determine a canonical export name at .open time is awkward; the two uses (answering NBD_OPT_LIST for a full list, vs. remapping a client's "" into a canonical name
2023 Jan 27
2
[nbdkit PATCH 1/2] retry: Add in retry support during .open
Now that a filter can open a backend as many times as it wants, there's no longer a technical reason we can't retry .open. However, adding retry logic here does mean we have to weaken an assert in the server backend code, since prepare can now be reached more than once. Test coverage will be added in a separate patch, so that it becomes easy to swap patch order and see that the test
2020 Feb 11
0
[PATCH nbdkit 3/3] server: Remove explicit connection parameter, use TLS instead.
Since commit 86fdb48c6a5362d66865493d9d2172166f99722e we have stored the connection object in thread-local storage. In this very large, but mostly mechanical change we stop passing the connection pointer around everywhere, and instead use the value stored in thread-local storage. This assumes a 1-1 mapping between the connection and the current thread which is true in *most* places.
2020 Aug 07
7
[nbdkit PATCH 0/3] Content differentiation during --tls=on
Patch 3 still needs tests added, but it is at least working from my simple command line tests. Eric Blake (3): server: Implement nbdkit_is_tls for use during .open server: Expose final thread_model to filter's .get_ready tlsdummy: New filter docs/nbdkit-filter.pod | 21 +- docs/nbdkit-plugin.pod | 34 ++- docs/nbdkit-tls.pod
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 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.
2019 Sep 19
7
[nbdkit PATCH 0/4] Spec compliance patches
The first one is the nastiest - it is an assertion failure caused by a spec-compliant client and introduced by our security fix that was released in 1.14.1. Eric Blake (4): server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO server: Fix back-to-back SET_META_CONTEXT server: Forbid NUL in export and context names server: Fix OPT_GO on different export than SET_META_CONTEXT
2020 Sep 21
0
[nbdkit PATCH v3 06/14] api: Add .export_description
I'm about to add an 'exportname' filter, and in the process, I noticed a few shortcomings in our API. Having .default_export makes it easy to answer NBD_INFO_NAME in response to a client request during NBD_OPT_GO, but answering NBD_INFO_DESCRIPTION is awkward - there's no guarantee the export name was given with a description in .list_exports. Note, however, that while we map
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 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);
2020 Feb 22
1
Re: Plans for nbdkit 1.18 release?
On Sat, Feb 22, 2020 at 05:11:01AM -0600, Eric Blake wrote: > On 2/22/20 4:37 AM, Richard W.M. Jones wrote: > >Another thing I've been thinking about for some time is splitting > >.config_complete into .config_complete + .get_ready (new name TBD). > >At the moment .config_complete is both the place where we finish > >processing config, and also the last chance we get
2020 Aug 25
0
[nbdkit PATCH 3/5] api: Add nbdkit_string_intern helper
Implementing .default_export with its 'const char *' return is tricky in the sh plugin: we must return dynamic memory, but must avoid a use-after-free. And we don't want to change the return type of .default_export to 'char *', because that would make our choice of malloc()/free() part of the API, preventing either nbdkit or a plugin from experimenting with an alternate
2020 Aug 27
0
[nbdkit PATCH v2 4/8] api: Add nbdkit_str[n]dup_intern helper
Implementing .default_export with its 'const char *' return is tricky in the sh plugin: we must return dynamic memory, but must avoid a use-after-free. And we don't want to change the return type of .default_export to 'char *', because that would make our choice of malloc()/free() part of the API, preventing either nbdkit or a plugin from experimenting with an alternate
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
2019 Sep 19
0
[nbdkit PATCH 4/4] server: Fix OPT_GO on different export than SET_META_CONTEXT
The NBD spec says that if a client requests SET_META_CONTEXT for exportA, but later requests NBD_OPT_GO/EXPORT_NAME for exportB, then the server should reject NBD_CMD_BLOCK_STATUS requests (that is, the context returned for exportA need not apply to exportB). When we originally added base:allocation, our argument was that we always ignore export names, so it was easier to just treat any two
2023 Jan 28
1
[nbdkit PATCH 1/2] retry: Add in retry support during .open
On Fri, Jan 27, 2023 at 02:41:22PM -0600, Eric Blake wrote: > Now that a filter can open a backend as many times as it wants, > there's no longer a technical reason we can't retry .open. However, > adding retry logic here does mean we have to weaken an assert in the > server backend code, since prepare can now be reached more than once. > > Test coverage will be added