search for: default_exportname

Displaying 8 results from an estimated 8 matches for "default_exportname".

2020 Aug 25
0
[nbdkit PATCH 1/5] api: Add .default_export
...t_only); /* XXX Switch to is_tls... */ controlpath_debug ("%s: list_exports readonly=%d default_only=%d", b->name, readonly, default_only); assert (h->handle == NULL); assert ((h->state & HANDLE_OPEN) == 0); - if (default_only && h->default_exportname) - return nbdkit_add_export (exports, h->default_exportname, NULL); r = b->list_exports (b, readonly, default_only, exports); if (r == -1) @@ -180,13 +179,34 @@ backend_list_exports (struct backend *b, int readonly, int default_only, else { size_t count = nbdkit_exports_coun...
2020 Aug 25
2
Re: [RFC nbdkit PATCH] protocol: Alter .list_exports, add .default_export
...> > Plugins cannot access the TCP connection except through public APIs ;) Sure, plugins can't, but there's some code in the server which you've written which could be doing: GET_CONN; const char *new_name; ... new_name = plugin->default_export (...); if (conn->default_exportname != NULL) free (conn->default_exportname); conn->default_exportname = strdup (new_name); > I've got the patch working (it passes 'make check-valgrind'), so > I'll post it later this morning to demo why it is useful. > > >But anyway ... > > > >...
2020 Aug 25
0
Re: [RFC nbdkit PATCH] protocol: Alter .list_exports, add .default_export
...on except through public APIs ;) > > Sure, plugins can't, but there's some code in the server which you've > written which could be doing: > > GET_CONN; > const char *new_name; > ... > new_name = plugin->default_export (...); > if (conn->default_exportname != NULL) > free (conn->default_exportname); > conn->default_exportname = strdup (new_name); So you're suggesting that the signature for .default_export should return 'char *' of malloc()d storage, and that nbdkit is then responsible for free()ing that string. It&...
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 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
2020 Aug 25
2
Re: [RFC nbdkit PATCH] protocol: Alter .list_exports, add .default_export
On Mon, Aug 24, 2020 at 05:02:56PM -0500, Eric Blake wrote: > On 8/24/20 7:52 AM, Eric Blake wrote: > >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. First, .list_exports > >needs to know if it is pre- or post-TLS, as that may
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 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