search for: context_base_allocation

Displaying 12 results from an estimated 12 matches for "context_base_allocation".

2019 Sep 12
1
[libnbd PATCH] nbdsh: Support -u as synonym for --connect
...+++ b/sh/test-context.sh @@ -21,7 +21,7 @@ fail=0 # Without -b, no meta context is requested output=$(nbdkit -U - null --run 'nbdsh \ - --connect "nbd+unix://?socket=$unixsocket" \ + -u "nbd+unix://?socket=$unixsocket" \ -c "print (h.can_meta_context (nbd.CONTEXT_BASE_ALLOCATION))"') if test "x$output" != xFalse; then echo "$0: unexpected output: $output" @@ -30,7 +30,7 @@ fi # With -b (and a server that supports it), meta context works. output=$(nbdkit -U - null --run 'nbdsh \ - -b --connect "nbd+unix://?socket=$unixsocket...
2019 Sep 12
2
[libnbd PATCH] nbdsh: Add -b option to simplify h.block_status
...brief command line help and exit. +=item B<-b> + +=item B<--base-allocation> + +Request the use of the "base:allocation" meta context, which is the +most common context used with L<nbd_block_status(3)>. This is +equivalent to calling S<C<h.set_meta_context +(nbd.CONTEXT_BASE_ALLOCATION)>> in the shell prior to connecting. + =item B<-c> 'COMMAND ...' =item B<--command> 'COMMAND ...' diff --git a/python/nbdsh.py b/python/nbdsh.py index 319b0f0..00bc6bc 100644 --- a/python/nbdsh.py +++ b/python/nbdsh.py @@ -27,6 +27,8 @@ def shell(): epilog...
2019 Sep 12
1
[libnbd PATCH v2] nbdsh: Prefer --uri over --connect
...append', help="run a command") parser.add_argument ('-V', '--version', action='version', @@ -56,8 +58,8 @@ help (nbd) # Display documentation if args.base_allocation: h.add_meta_context (nbd.CONTEXT_BASE_ALLOCATION) - if args.connect is not None: - h.connect_uri (args.connect) + if args.uri is not None: + h.connect_uri (args.uri) # If there are no -c or --command parameters, go interactive, # otherwise we run the commands and exit. if not args.command: diff --git a/sh/test-c...
2020 Sep 28
2
[libnbd PATCH] nbdsh: Add --opt-mode command line option
...h/nbdsh.pod +++ b/sh/nbdsh.pod @@ -60,8 +60,10 @@ Display brief command line help and exit. Request the use of the "base:allocation" meta context, which is the most common context used with L<nbd_block_status(3)>. This is -equivalent to calling S<C<h.set_meta_context -(nbd.CONTEXT_BASE_ALLOCATION)>> in the shell prior to connecting. +equivalent to calling +S<C<h.set_meta_context(nbd.CONTEXT_BASE_ALLOCATION)>> in the shell +prior to connecting, and works even when combined with C<--uri> (while +attempting the same with C<-c> would be too late). =item B<-c&g...
2022 Nov 04
3
[libnbd PATCH v2 0/3] Improve nbdsh -u handling
v1 was here: https://listman.redhat.com/archives/libguestfs/2022-October/030216.html Since then, I've incorporated changes based on Rich's feedback: swap order of patches 2 and 3 less change in patch 1 (including no unsafe eval(%s) for --uri) in patch 2, include -c in list of snippets to store, and use dict of lambdas to map back to the desired action Eric Blake (3): nbdsh:
2020 Aug 19
3
[libnbd PATCH 0/2] NBD_OPT_INFO support
This replaces 13/13 of my v2 series; and now that it has pretty good testsuite coverage and demonstrable performance improvement to nbdinfo, I'm going ahead and pushing this now. We may still want to add further nbd_opt_* commands for other fine-grained tuning of negotiation, but for now, I think things have stabilized on this end, and I can return to polishing .list_exports on the nbdkit
2020 Oct 02
4
[libnbd PATCH v2 0/2] opt_list_meta_context
In v2: ack'ed preliminary patches have been pushed, and I've added a lot of testsuite coverage as well as putting the new API to use in nbdinfo. Eric Blake (2): api: Add nbd_opt_list_meta_context info: List available meta-contexts lib/internal.h | 1 + generator/API.ml | 84 ++++++++-
2020 Sep 05
1
Re: libnbd completion callback question
...9; got here print("got here") Maximum resident set size (kbytes): 17796 Average resident set size (kbytes): 0 Ideally, increasing the loop iterations should have no effect on the max memory usage. Replacing the h.set_request_structured_replies(False) line with h.add_meta_context(nbd.CONTEXT_BASE_ALLOCATION) (so that the block status request succeeds instead) proves the point; after that change, I'm seeing 17296k with count=1 and 17284k with count=10000 (that is, the memory usage is higher and somewhat less deterministic because there is now server interactions, but definitely no longer someth...
2019 Oct 01
0
[nbdkit PATCH 6/6] tests: Test retry after partial extents
...plugin which will test retrying. +nbdkit -v -U - \ + sh - \ + --filter=retry retry-delay=1 \ + --run 'nbdsh --base-allocation --uri $uri -c " +entries = [] +def f (metacontext, offset, e, err): + global entries + assert err.value == 0 + assert metacontext == nbd.CONTEXT_BASE_ALLOCATION + entries = e +h.block_status (1024, 0, f) +assert entries == [ 512, 0, + 512, 3] + "' <<'EOF' +#!/usr/bin/env bash +case "$1" in + open) + # Count how many times the connection is (re-)opened. + read i < retry-extents...
2020 Sep 05
2
libnbd completion callback question
I noticed while reading the code that we have a documentation hole that may cause memory leaks for clients that are unaware, in relation to completion callbacks. The situation arises as follows: for all commands with a completion callback, I checked that the code has clean semantics: either nbd_aio_FOO() returns -1 and we never call the callback cleanup, or nbd_aio_FOO() returns a cookie and
2020 Feb 10
1
[nbdkit PATCH] split: Add support for .extents
...it-extents.2 + +# Test the split plugin +nbdkit -v -U - split test-split-extents.1 test-split-extents.2 \ + --run 'nbdsh --base-allocation --uri $uri -c " +entries = [] +def f (metacontext, offset, e, err): + global entries + assert err.value == 0 + assert metacontext == nbd.CONTEXT_BASE_ALLOCATION + entries = e +h.block_status (2 * 1024 * 1024, 0, f) +assert entries == [ 512 * 1024, 3, + 1024 * 1024, 0, + 512 * 1024, 3 ] +entries = [] +# With req one, extents stop at file boundaries +h.block_status (1024 * 1024, 768 * 1024, f, nbd.CMD_FLAG_REQ_ONE) +a...
2019 Oct 01
9
[nbdkit PATCH v2 0/6] Improve retry filter
Includes a rework of the previously posted patch for --run improvements (mostly with improved comments and commit message; I decided that waiting for the captive nbdkit to exit was overkill), and four new patches. The tests are intentionally separate, to allow rearranging the order of the series to see the failures being fixed. Eric Blake (6): server: Propagate unexpected nbdkit failure with