Displaying 20 results from an estimated 10000 matches similar to: "[PATCH nbdkit] tests/test-exportname.sh: Fix test."
2020 Jul 31
0
[RFC nbdkit PATCH 4/4] sh, eval: Add .list_exports support
Exposing .list_exports through to shell scripts makes testing export
listing a lot more feasible. The design chosen here is amenable to
'ls -1' or 'find' output provided there are no newlines or whitespace
in the files being listed (the user gives up descriptions in that
case), while also being flexible enough to support names or
descriptions with arbitrary content. One idea that
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
2020 Oct 02
0
[libnbd PATCH v2 2/2] info: List available meta-contexts
Use the just-added nbd_opt_list_meta_context() API to give more
details about each export (matching what 'qemu-nbd --list' already
does). Note that this requires some shuffling: listing meta exports
requires being in opt mode, but is easiest to do in list_one_export(),
which requires setting opt_mode in more code paths, and deferring
ready mode until the last possible minute during
2020 Aug 06
0
[nbdkit PATCH v2 5/5] sh, eval: Add .list_exports support
Exposing .list_exports through to shell scripts makes testing export
listing a lot more feasible. The design chosen here is amenable to
'ls -1' or 'find' output provided there are no newlines in the files
being listed, while also being flexible enough to support a future
format addition if we find ourselves needing a way to express escape
sequences or parsing machine-readable code
2020 Aug 27
0
[PATCH nbdkit 2/2] api: Remove .list_exports from nbdkit 1.22 release.
During the 1.21 development cycle we added support for listing
exports. However at the time that 1.22 was released we did not feel
the API was sufficiently finalized to commit to in a stable branch.
Therefore this new API was removed before 1.22 was released, but the
feature continues to be developed upstream and should appear in
nbdkit 1.24.
Note this also hides the nbdkit*export* functions so
2020 Aug 25
0
[nbdkit PATCH 5/5] sh, eval: Implement .default_export
Use the recently added nbdkit_string_intern to make this possible.
Testsuite coverage is added in both tls-fallback as well as a cleanup
to test-eval-exports.sh.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
plugins/eval/nbdkit-eval-plugin.pod | 2 ++
plugins/sh/nbdkit-sh-plugin.pod | 20 +++++++++--
plugins/sh/methods.h | 1 +
plugins/eval/eval.c |
2020 Jul 22
2
[nbdkit PATCH] server: Reinstate limited use of -e/-exportname.
While we are unlikely to change our decision that -e should not
control our response to NBD_OPT_LIST (because we intend to add a new
callback .extents_list for that), it turns out that it is a lot easier
to write:
nbdkit -U - -e foo info --run 'nbdsh -u "$uri" -c "print(h.pread(3, 0))"'
than it is to write the equivalent:
nbdkit -U - info --run 'nbdsh -u
2020 Aug 27
4
[nbdkit PATCH 0/2] ext2 export list tweaks
Applies on top of my pending series for the exportname filter,
addressing one of the todo's in that cover letter.
Eric Blake (2):
filters: Add .export_description wrappers
ext2: Supply .list_exports and .default_export
filters/ext2/nbdkit-ext2-filter.pod | 3 +-
tests/Makefile.am | 16 +++-
filters/ext2/ext2.c | 125 +++++++++++++++++++---------
2020 Jul 21
3
[PATCH nbdkit] server: Deprecate the -e/--exportname parameter.
This parameter provided a name for the "default export" -- ie. the one
and only export returned to the client by NBD_OPT_LIST. But nbdkit
traditionally didn't care what export name the client requested.
Since 1.16 plugins have been able to serve different content per
export name (and return errors for unknown exports), but the -e option
didn't reflect that and only created
2020 Aug 07
0
[nbdkit PATCH 2/4] file: Add .list_exports support
Add a new mode to the file plugin, using directory=DIR instead of
[file=]FILE, to allow it to serve all regular/block files in a given
directory, as well as advertising the names of those files it will be
serving.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
plugins/file/nbdkit-file-plugin.pod | 28 +++++-
tests/Makefile.am | 4 +-
plugins/file/file.c
2020 Aug 27
0
[nbdkit PATCH 2/2] ext2: Supply .list_exports and .default_export
When using ext2file=exportname to pick the file to server from the
client's export name, we do not want to leak the underlying plugin's
export list. While touching this, take advantage of string lifetimes
via nbdkit_strdup_intern and similar for less cleanup bookkeeping.
Note that we don't actually implement a full .list_exports; doing that
with NBD_OPT_LIST is likely prohibitive
2020 Jul 22
2
Re: [PATCH nbdkit] server: Deprecate the -e/--exportname parameter.
On 7/22/20 4:02 AM, Richard W.M. Jones wrote:
>> The more I think about it, the more I disagree with disabling this.
>> Or, put another way, I think that the _only_ time -e makes sense is
>> _when_ you are using --run. Consider:
>>
>> nbdkit -U - -e foo info --run 'nbdsh -u $uri -c "print(h.pread(3, 0))"'
>> nbdkit -U - -e bar info --run
2020 Aug 07
1
Re: [nbdkit RFC PATCH 4/4] exportname: New filter
On Thu, Aug 06, 2020 at 09:23:48PM -0500, Eric Blake wrote:
> Add a new filter to make it easier to add exports to a plugin that
> does advertise them, to avoid advertising where a plugin's list might
does *not* advertise them(?)
> be an information leak, and to alter which export name is used in
> place of "".
>
> I would love to be able to have a strict mode
2020 Sep 26
0
[PATCH nbdinfo v2] info: Add a --map option for displaying allocation metadata.
---
info/Makefile.am | 4 +
info/info-map-base-allocation-json.sh | 52 ++++++++++
info/info-map-base-allocation.sh | 49 ++++++++++
info/nbdinfo.c | 134 ++++++++++++++++++++++++--
info/nbdinfo.pod | 39 +++++++-
5 files changed, 271 insertions(+), 7 deletions(-)
diff --git a/info/Makefile.am b/info/Makefile.am
index
2020 Jul 22
2
Re: [PATCH nbdkit] server: Deprecate the -e/--exportname parameter.
On 7/21/20 12:46 PM, Eric Blake wrote:
>> (2) The --run option no longer sets $exportname (to -e) nor puts the
>> export name into the $uri. However this was always the wrong
>> thing to do since export names are per connection, not per server.
>> Existing --run scripts will see $exportname expand to "" which is
>> most likely what they
2020 Oct 01
1
Re: [PATCH nbdinfo v2] info: Add a --map option for displaying allocation metadata.
On 9/26/20 11:36 AM, Richard W.M. Jones wrote:
> ---
> info/Makefile.am | 4 +
> info/info-map-base-allocation-json.sh | 52 ++++++++++
> info/info-map-base-allocation.sh | 49 ++++++++++
> info/nbdinfo.c | 134 ++++++++++++++++++++++++--
> info/nbdinfo.pod | 39 +++++++-
> 5 files changed, 271
2020 Aug 07
8
[nbdkit PATCH 0/4] More .list_exports uses
Here's changes to the file plugin (which I'm happy with) and a new
exportname filter (which is still at RFC stage; I need to finish
implementing strict mode in .open, and add tests).
I also discovered that we really want .list_exports and .open to know
when they are used on plaintext vs. tls clients for --tls=on, and we
may want to split out a new .default_export callback rather than
2020 Aug 07
1
Re: [nbdkit PATCH 2/4] file: Add .list_exports support
On Thu, Aug 06, 2020 at 09:23:46PM -0500, Eric Blake wrote:
> + if (!filename == !directory) {
A bit tricksy. In plugins/nbd/nbd.c I used:
int c = !!sockname + !!hostname + !!uri +
(command.size > 0) + (socket_fd >= 0) + !!raw_cid;
/* Check the user passed exactly one connection parameter. */
if (c > 1) {
nbdkit_error ("cannot mix Unix ‘socket’, TCP
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);