search for: metacontexts

Displaying 20 results from an estimated 82 matches for "metacontexts".

Did you mean: metacontext
2019 Jun 27
1
[libnbd PATCH] block-status: Make callback usage consistent with pread_structured
Now that we have a way to pass Mutable(Int "error") to callbacks, that's a much nicer way for language bindings to use than relying on the value of errno after returning -1. Update the semantics for block status to match what pread_structured does, getting errno out of the equation, and changing things to call the callback for a second context even after an earlier callback failure
2020 Oct 16
3
[libnbd PATCH] info: Add support for new 'qemu-nbd -A' qemu:allocation-depth
A rather trivial decoding; we may enhance it further if qemu extends things to give an integer depth alongside its tri-state encoding. --- I'll wait to push this to libnbd until the counterpart qemu patches land upstream, although it looks like I've got positive review. info/nbdinfo.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/info/nbdinfo.c b/info/nbdinfo.c index
2023 Mar 03
1
[PATCH v2 5/6] spec: Introduce NBD_FLAG_BLOCK_STATUS_PAYLOAD
...Servers MUST NOT > > + advertise this bit unless the client successfully negotiates > > + extended headers via `NBD_OPT_EXTENDED_HEADERS`, and SHOULD NOT > > + advertise this bit in response to `NBD_OPT_EXPORT_NAME` or > > + `NBD_OPT_GO` if the client does not negotiate metacontexts with > > + `NBD_OPT_SET_META_CONTEXT`; clients SHOULD NOT set the > > + `NBD_CMD_FLAG_PAYLOAD_LEN` flag for `NBD_CMD_BLOCK_STATUS` unless > > + this transmission flag is set. > > Given that we are introducing this at the same time as the extended > headers (and given...
2019 Jun 27
0
Re: [libnbd PATCH] generator: Add support for namespace constants
On 6/27/19 5:07 AM, Martin Kletzander wrote: > This just defines the namespace, its contexts and related constants and the only > supported one is currently base:allocation. The names of the constants are not > very future-proof, but shorter than LIBNBD_META_NS_CONTEXT_BASE_ALLOCATION or > similar. > > Currently the output looks like this: > > /* "base"
2019 Jun 04
0
[PATCH libnbd v2 2/4] generator: Callback returns int instead of void.
Callback functions now return an int instead of a void. This allows in some cases for the callback to indicate that there was an error. This is a small change to the API: For nbd_set_debug_callback the signature has changed, but the return value is ignored. For nbd_block_status and nbd_aio_block_status the extent function can return an error, which causes the block status command to return an
2020 Oct 27
0
Re: [libnbd PATCH] info: Add support for new 'qemu-nbd -A' qemu:allocation-depth
On 10/16/20 10:23 AM, Eric Blake wrote: > A rather trivial decoding; we may enhance it further if qemu extends > things to give an integer depth alongside its tri-state encoding. > --- > > I'll wait to push this to libnbd until the counterpart qemu patches > land upstream, although it looks like I've got positive review. Whoops, I accidentally pushed this before qemu
2019 Jun 04
0
[libnbd PATCH 2/2] api: Recover from block status callback failure
If the user's extent_fn callback fails, we want to fail the overall block status command with the same errno, but not give up on the server. Do this by skipping any further context chunks from the server, and relying on the previous patch's ability to preserve the first error encountered. Update the interop test with qemu's dirty bitmap context to provoke callback failure, as well as
2019 Jun 27
3
[libnbd PATCH] generator: Add support for namespace constants
This just defines the namespace, its contexts and related constants and the only supported one is currently base:allocation. The names of the constants are not very future-proof, but shorter than LIBNBD_META_NS_CONTEXT_BASE_ALLOCATION or similar. Currently the output looks like this: /* "base" namespace */ /* "base" namespace contexts */ /* "base:allocation"
2020 Sep 26
1
[PATCH nbdinfo proposal] info: Add a --map option for displaying allocation metadata
This is a rough-and-ready implementation of nbdinfo --map option, to display the allocation and other metadata of NBD exports. I only tested it lightly against nbdkit. It needs at least some tests. Command like these should work: nbdinfo --map nbd://localhost nbdinfo --map=qemu:dirty-bitmap nbd://localhost Rich.
2019 Jun 04
3
[libnbd PATCH 0/2] Better handling of failed block_status callback
Rather than moving the connection to DEAD, we can just ignore further contexts to the existing command handle, and fail the overall command with the same errno as the failed callback. Eric Blake (2): states: Track cmd->error as errno, not wire value api: Recover from block status callback failure generator/generator | 5 ++- generator/states-reply-simple.c | 2 +-
2020 Sep 26
2
[PATCH nbdinfo v2] info: Add a --map option for displaying allocation metadata.
Fixes bugs with JSON output in the previous patch, and adds some tests. Rich.
2019 Jul 24
0
[PATCH libnbd 2/3] lib: Implement closure lifetimes.
Previously closures had a crude flag which tells if they are persistent or transient. Transient closures (flag = false) last for the lifetime of the currently called libnbd function. Persistent closures had an indefinite lifetime which could last for as long as the handle. In language bindings handling persistent closures was wasteful as we needed to register a "close callback" to
2019 Jun 04
1
Re: [PATCH libnbd v2 2/4] generator: Callback returns int instead of void.
On 6/4/19 4:59 AM, Richard W.M. Jones wrote: > Callback functions now return an int instead of a void. This allows > in some cases for the callback to indicate that there was an error. > > This is a small change to the API: Indeed; and my work to let nbdkit-nbd use libnbd is slightly impacted. If I want to support both 0.1.2 and 0.1.x, I now have to do a conditional compilation
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
2019 Jul 24
0
[PATCH libnbd v2 2/5] lib: Implement closure lifetimes.
Previously closures had a crude flag which tells if they are persistent or transient. Transient closures (flag = false) last for the lifetime of the currently called libnbd function. Persistent closures had an indefinite lifetime which could last for as long as the handle. In language bindings handling persistent closures was wasteful as we needed to register a "close callback" to
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
2019 Aug 13
0
[PATCH libnbd 1/6] generator: Share single list of all Closures.
This change does not affect the output of the generator. Note this requires that all Closure args have the same parameter name whichever method they appear in. An alternate refactoring could work the same way as Flags and Enum where the parameter name is part of the arg, eg: type arg = ... | Closure of string * closure (* name, type *) ... "set_debug_callback", {
2019 May 28
0
[libnbd PATCH 2/4] api: Rearrange flags argument to block_status
This is an API/ABI break, but we have not yet declared stable API. In order to use optional arguments in languages that support that, any optional arguments must be last. Let's be consistent in this by rearranging the arguments to block_status so that flags is always last. --- generator/generator | 10 ++++++---- interop/dirty-bitmap.c | 6 +++--- lib/rw.c
2019 Jul 16
2
[PATCH libnbd] generator: Define new Closure type
** INCOMPLETE ** This is the generator change as discussed on the list already. The Python and OCaml bindings are not yet done. It passes all [C only] tests and valgrind. Note that nbd_add_close_callback is inconsistent with other closure types because it passes the user_data parameter after the function. (This is not caused by the current patch, it was already inconsistent). We decided that
2019 Jul 25
0
[PATCH libnbd v3 1/2] lib: Implement closure lifetimes.
Previously closures had a crude flag which tells if they are persistent or transient. Transient closures (flag = false) last for the lifetime of the currently called libnbd function. Persistent closures had an indefinite lifetime which could last for as long as the handle. In language bindings handling persistent closures was wasteful as we needed to register a "close callback" to