search for: can_meta_context

Displaying 18 results from an estimated 18 matches for "can_meta_context".

2019 Sep 12
1
[libnbd PATCH] nbdsh: Support -u as synonym for --connect
...- a/sh/test-context.sh +++ 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 "n...
2019 Sep 12
1
[libnbd PATCH v2] nbdsh: Prefer --uri over --connect
...text.sh +++ b/sh/test-context.sh @@ -21,7 +21,7 @@ fail=0 # Without --base-allocation, 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,26 +30,26 @@ fi # With --base-allocation (and a server that supports it), meta context works. output=$(nbdkit -U - null --run 'nbdsh \ - --b...
2019 Sep 12
2
[libnbd PATCH] nbdsh: Add -b option to simplify h.block_status
...ftware +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +# Test effects of nbdsh -b +fail=0 + +# Without -b, no meta context is requested +output=$(nbdkit -U - null --run 'nbdsh \ + --connect "nbd+unix://?socket=$unixsocket" \ + -c "print (h.can_meta_context (nbd.CONTEXT_BASE_ALLOCATION))" </dev/null') +if test "x$output" != xFalse; then + echo "$0: unexpected output: $output" + fail=1 +fi + +# With -b (and a server that supports it), meta context works. +output=$(nbdkit -U - null --run 'nbdsh \ + -b --conne...
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 Sep 28
0
[libnbd PATCH 1/3] api: Add get_nr_meta_contexts, clear_meta_contexts
...;-B> option)."; - see_also = [Link "block_status"]; +C<\"qemu:dirty-bitmap:...\"> and C<\"qemu:allocation-depth\"> for +qemu-nbd (see qemu-nbd I<-B> and I<-A> options)."; + see_also = [Link "block_status"; Link "can_meta_context"; + Link "get_nr_meta_contexts"; Link "get_meta_context"; + Link "clear_meta_contexts"]; + }; + + "get_nr_meta_contexts", { + default_call with + args = []; ret = RInt; + shortdesc = "return the current numbe...
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 Sep 28
2
[libnbd PATCH] nbdsh: Add --opt-mode command line option
...nix://?socket=$unixsocket" \ @@ -62,4 +75,21 @@ else echo "$0: nbdkit lacks --no-sr" fi +# Test interaction with opt mode +output=$(nbdkit -U - null --run 'nbdsh \ + -u "nbd+unix://?socket=$unixsocket" --opt-mode --base-allocation \ + -c " +try: + h.can_meta_context(nbd.CONTEXT_BASE_ALLOCATION) + assert(False) +except nbd.Error: + pass +" \ + -c "h.opt_go()" \ + -c "print(h.can_meta_context(nbd.CONTEXT_BASE_ALLOCATION))"') +if test "x$output" != xTrue; then + echo "$0: unexpected output: $output"...
2020 Sep 11
0
[libnbd PATCH v2 3/5] api: Add nbd_set_strict_mode
...e_also = [Link "get_request_structured_replies"; - Link "set_handshake_flags"; + Link "set_handshake_flags"; Link "set_strict_mode"; Link "get_structured_replies_negotiated"; Link "can_meta_context"; Link "can_df"]; }; @@ -692,7 +705,7 @@ blindly setting a constant value."; "get_handshake_flags", { default_call with - args = []; ret = RFlags (handshake_flags); + args = []; ret = RFlags handshake_flags; may_set_error = false; shortdesc...
2020 Feb 10
0
[libnbd PATCH 1/1] generator: Add support for NBD_INFO_INIT_STATE extension
...all with args = []; ret = RInt64; @@ -2292,7 +2317,7 @@ return only one extent per metadata context where that extent does not exceed C<count> bytes; however, libnbd does not validate that the server obeyed the flag."; see_also = [Link "add_meta_context"; Link "can_meta_context"; - Link "aio_block_status"]; + Link "aio_block_status"; Link "get_init_flags"]; }; "poll", { @@ -2619,7 +2644,8 @@ as described in L<libnbd(3)/Completion callbacks>. Other parameters behave as documented in L...
2020 Aug 10
0
Re: [PATCH nbdkit] python: Implement can_extents + extents.
...es > + # even if the plugin doesn't support them. > + # > + #def test_can_extents_true (self): > + # self.h.add_meta_context ("base:allocation") > + # self.connect ({"size": 512, "can_extents": True}) > + # assert self.h.can_meta_context ("base:allocation") > + # > + #def test_can_extents_false (self): > + # self.h.add_meta_context ("base:allocation") > + # self.connect ({"size": 512, "can_extents": False}) > + # assert not self.h.can_meta_context (&quot...
2020 Aug 10
5
[PATCH nbdkit] python: Implement can_extents + extents.
...llocation block_status responses + # even if the plugin doesn't support them. + # + #def test_can_extents_true (self): + # self.h.add_meta_context ("base:allocation") + # self.connect ({"size": 512, "can_extents": True}) + # assert self.h.can_meta_context ("base:allocation") + # + #def test_can_extents_false (self): + # self.h.add_meta_context ("base:allocation") + # self.connect ({"size": 512, "can_extents": False}) + # assert not self.h.can_meta_context ("base:allocation")...
2019 Sep 05
0
[PATCH libnbd] generator: Move first_version fields to a single table.
...y", (1, 0); + "can_flush", (1, 0); + "can_fua", (1, 0); + "is_rotational", (1, 0); + "can_trim", (1, 0); + "can_zero", (1, 0); + "can_df", (1, 0); + "can_multi_conn", (1, 0); + "can_cache", (1, 0); + "can_meta_context", (1, 0); + "get_size", (1, 0); + "pread", (1, 0); + "pread_structured", (1, 0); + "pwrite", (1, 0); + "shutdown", (1, 0); + "flush", (1, 0); + "trim", (1, 0); + "cache", (1, 0); + "zero", (1, 0)...
2019 Sep 05
3
[PATCH libnbd] generator: Move first_version fields to a single table.
This doesn't include Eric's new APIs, but if you push those then I can rebase this one on top. Rich.
2020 Sep 28
8
[libnbd PATCH 0/3] opt_list_meta_context
I'm posting this now, as I'm at the end of a workday and I got things working for manual experimentation. Still to do: - write interop tests for qemu-nbd and nbdkit (including my proposed patch addition of qemu-nbd -A to show qemu:allocation-depth) - figure out if we can make 'nbdinfo --map' use the new API to automatically select all contexts advertised by the server Eric Blake
2019 Aug 06
5
[PATCH libnbd 0/3] One API and small documentation changes.
One API change, some small documentation changes.
2020 Sep 11
10
[libnbd PATCH v2 0/5] Add knobs for client- vs. server-side validation
In v2: - now based on my proposal to add LIBNBD_SHUTDOWN_IMMEDIATE - four flags instead of two: STRICT_FLAGS is new (patch 4), and STRICT_BOUNDS is separate from STRICT_ZERO_SIZE (patch 5) - various refactorings for more shared code and less duplication Eric Blake (5): api: Add xxx_MASK constant for each Flags type generator: Refactor filtering of accepted OFlags api: Add
2020 Feb 10
17
Cross-project NBD extension proposal: NBD_INFO_INIT_STATE
I will be following up to this email with four separate threads each addressed to the appropriate single list, with proposed changes to: - the NBD protocol - qemu: both server and client - libnbd: client - nbdkit: server The feature in question adds a new optional NBD_INFO_ packet to the NBD_OPT_GO portion of handshake, adding up to 16 bits of information that the server can advertise to the
2020 Aug 14
18
[libnbd PATCH v2 00/13] Adding nbd_set_opt_mode to improve nbdinfo
Well, I'm not quite done (I still want to get nbdinfo to work on a single nbd connection for all cases when reading the heads of the file is not required), but I'm happy with patches 1-11, and 12-13 show where I'm headed for getting NBD_OPT_INFO to work. Posting now to see if some of the earlier patches are ready to commit while I continue working on the latter half. Eric Blake (13):