Displaying 12 results from an estimated 12 matches for "base_allocation".
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" namespace */
>
> /* "base" namespace contexts */
>
> /* "base:allocation" context related constants */
>
> Separated by two empty lines from unrelated parts of t...
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" context related constants */
Separated by two empty lines from unrelated parts of the header file above and
below.
Signed-off-by: Martin...
2019 Jun 04
0
[libnbd PATCH 2/2] api: Recover from block status callback failure
...rop/dirty-bitmap.c
@@ -23,6 +23,8 @@
#include <string.h>
#include <unistd.h>
#include <assert.h>
+#include <stdbool.h>
+#include <errno.h>
#include <libnbd.h>
@@ -30,21 +32,31 @@ static const char *unixsocket;
static const char *bitmap;
static const char *base_allocation = "base:allocation";
-static int calls; /* Track which contexts passed through callback */
+struct data {
+ bool req_one; /* input: true if req_one was passed to request */
+ int count; /* input: count of expected remaining calls */
+ bool fail; /* input: true to return...
2019 May 19
5
[libnbd PATCH 0/4] Various interop fixes
Some of these affect attempts to connect to older qemu-nbd versions,
some of them were triggered by manual edits to qemu-nbd source code to
provoke various other compliant (if uncommon) server behaviors.
Eric Blake (4):
starttls: Skip error payload if falling back to unencrypted
states: Reject payload to NBD_REP_ACK
meta-context: Skip error payload if server lacks meta_context
states: Add
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:
2019 Jun 04
1
Re: [PATCH libnbd v2 2/4] generator: Callback returns int instead of void.
...t. */
> debug (h, "server sent unexpected meta context ID %" PRIu32,
> diff --git a/interop/dirty-bitmap.c b/interop/dirty-bitmap.c
> index b3a89d0..8d34173 100644
> --- a/interop/dirty-bitmap.c
> +++ b/interop/dirty-bitmap.c
> @@ -32,7 +32,7 @@ static const char *base_allocation = "base:allocation";
>
> static int calls; /* Track which contexts passed through callback */
>
> -static void
> +static int
> cb (void *data, const char *metacontext, uint64_t offset,
> uint32_t *entries, size_t len)
> {
> @@ -71,6 +71,8 @@ cb (void...
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 +-
2019 Sep 12
2
[libnbd PATCH] nbdsh: Add -b option to simplify h.block_status
...ommand 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
...t ('-c', '--command', action='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...
2020 Sep 28
2
[libnbd PATCH] nbdsh: Add --opt-mode command line option
...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...
2019 Jun 04
0
[PATCH libnbd v2 2/4] generator: Callback returns int instead of void.
...a debug message, but ignore it. */
debug (h, "server sent unexpected meta context ID %" PRIu32,
diff --git a/interop/dirty-bitmap.c b/interop/dirty-bitmap.c
index b3a89d0..8d34173 100644
--- a/interop/dirty-bitmap.c
+++ b/interop/dirty-bitmap.c
@@ -32,7 +32,7 @@ static const char *base_allocation = "base:allocation";
static int calls; /* Track which contexts passed through callback */
-static void
+static int
cb (void *data, const char *metacontext, uint64_t offset,
uint32_t *entries, size_t len)
{
@@ -71,6 +71,8 @@ cb (void *data, const char *metacontext, uint64_t off...
2019 Jun 04
9
[PATCH libnbd v2 0/4] api: Implement concurrent writer.
v1:
https://www.redhat.com/archives/libguestfs/2019-June/msg00014.html
I pushed a few bits which are uncontroversial. The main
changes since v1 are:
An extra patch removes the want_to_send / check for nbd_aio_is_ready
in examples/threaded-reads-and-writes.c. This logic was wrong since
commit 6af72b87 as was pointed out by Eric in his review. Comments
and structure of