search for: nbd_is_read_on

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

Did you mean: nbd_is_read_only
2019 Aug 06
0
[PATCH libnbd 1/3] api: Change nbd_read_only -> nbd_is_read_only.
...6a329d6 100644 --- a/docs/libnbd.pod +++ b/docs/libnbd.pod @@ -383,7 +383,7 @@ the export, such as whether it is writable and if it can support flush to permanent storage. These flags can be accessed from libnbd using APIs such as: - int is_read_only = nbd_read_only (nbd); + int is_read_only = nbd_is_read_only (nbd); int can_flush = nbd_can_flush (nbd); (and several more, see L<libnbd-api(3)>). diff --git a/examples/batched-read-write.c b/examples/batched-read-write.c index 9d2c02b..d39a1e5 100644 --- a/examples/batched-read-write.c +++ b/examples/batched-read-write.c @@ -160,7 +160,7 @@ mai...
2019 Aug 06
1
Re: [PATCH libnbd 1/3] api: Change nbd_read_only -> nbd_is_read_only.
...ion in configure.ac instead of doing this hack to support both versions. diff --git i/plugins/nbd/nbd.c w/plugins/nbd/nbd.c index f11e54d5..a83ded5e 100644 --- i/plugins/nbd/nbd.c +++ w/plugins/nbd/nbd.c @@ -566,11 +566,15 @@ nbdplug_get_size (void *handle) return size; } +#ifndef LIBNBD_HAVE_NBD_IS_READ_ONLY +# define nbd_is_read_only nbd_read_only +#endif + static int nbdplug_can_write (void *handle) { struct handle *h = handle; - int i = nbd_read_only (h->nbd); + int i = nbd_is_read_only (h->nbd); if (i == -1) { nbdkit_error ("failure to check readonly flag: %s", nb...
2019 Aug 06
5
[PATCH libnbd 0/3] One API and small documentation changes.
One API change, some small documentation changes.
2019 Aug 14
3
[libnbd PATCH 0/2] Drop generated file from git
Rich recently patched things to generate one man page per function rather than libnbd-api.3 (nice), but in doing so got stumped by a problem with a fresh git clone (automake fails for any 'include' directive that does not already exist). I've figured out how to hack around it, but the hack requires GNU make. We already use GNU make constructs elsewhere (such as $(wildcard)), but
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 22
3
[libnbd PATCH v2] nbdsh: Catch nbd.Error from -c arguments
...ut includes the python trace when debugging is enabled (which is +# the default for our testsuite, when using ./run). +nbdsh -c 'h.is_read_only()' >$out 2>$err && fail=1 +test ! -s $out +cat $err +grep Traceback $err +grep 'in is_read_only' $err +grep '^nbd\.Error: nbd_is_read_only: ' $err + +# Override ./run's default to show that without debug, the error is succinct. +nbdsh -c ' +import os +os.environ["LIBNBD_DEBUG"] = "0" +h.is_read_only() +' >$out 2>$err && fail=1 +test ! -s $out +cat $err +grep Traceback $err &&...
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 11
0
[libnbd PATCH v2 3/5] api: Add nbd_set_strict_mode
...ending at C<offset> + C<count> - 1. NBD can only write all or nothing using this call. The call returns when the command has been -acknowledged by the server, or there is an error. +acknowledged by the server, or there is an error. Note this will +generally return an error if L<nbd_is_read_only(3)> is true. The C<flags> parameter may be C<0> for no flags, or may contain C<LIBNBD_CMD_FLAG_FUA> meaning that the server should not return until the data has been committed to permanent storage (if that is supported - some servers cannot do this, see -L<nbd_can_fua...
2019 Aug 14
0
[libnbd PATCH 2/2] docs: Drop docs/Makefile.inc from git
...d_set_tls \ - nbd_get_tls \ - nbd_set_tls_certificates \ - nbd_set_tls_verify_peer \ - nbd_get_tls_verify_peer \ - nbd_set_tls_username \ - nbd_get_tls_username \ - nbd_set_tls_psk_file \ - nbd_add_meta_context \ - nbd_connect_uri \ - nbd_connect_unix \ - nbd_connect_tcp \ - nbd_connect_command \ - nbd_is_read_only \ - nbd_can_flush \ - nbd_can_fua \ - nbd_is_rotational \ - nbd_can_trim \ - nbd_can_zero \ - nbd_can_df \ - nbd_can_multi_conn \ - nbd_can_cache \ - nbd_can_meta_context \ - nbd_get_size \ - nbd_pread \ - nbd_pread_structured \ - nbd_pwrite \ - nbd_shutdown \ - nbd_flush \ - nbd_trim \ - nbd_cac...
2019 Aug 15
1
[PATCH libnbd] docs: Change docs/Makefile.inc back to a regular include, readd to git.
...d_set_tls \ + nbd_get_tls \ + nbd_set_tls_certificates \ + nbd_set_tls_verify_peer \ + nbd_get_tls_verify_peer \ + nbd_set_tls_username \ + nbd_get_tls_username \ + nbd_set_tls_psk_file \ + nbd_add_meta_context \ + nbd_connect_uri \ + nbd_connect_unix \ + nbd_connect_tcp \ + nbd_connect_command \ + nbd_is_read_only \ + nbd_can_flush \ + nbd_can_fua \ + nbd_is_rotational \ + nbd_can_trim \ + nbd_can_zero \ + nbd_can_df \ + nbd_can_multi_conn \ + nbd_can_cache \ + nbd_can_meta_context \ + nbd_get_size \ + nbd_pread \ + nbd_pread_structured \ + nbd_pwrite \ + nbd_shutdown \ + nbd_flush \ + nbd_trim \ + nbd_cac...
2020 Sep 18
1
[libnbd PATCH] nbdsh: Hide nbd.Error from abrt-python3-handler
...Triggering nbd.Error non-interactively prints the error +nbdsh -c 'h.is_read_only()' > test-error.out 2> test-error.err && fail=1 +test ! -s test-error.out +cat test-error.err +grep Traceback test-error.err +grep 'in is_read_only' test-error.err +grep '^nbd\.Error: nbd_is_read_only: ' test-error.err + +exit $fail -- 2.28.0
2020 Oct 02
0
[libnbd PATCH v2 2/2] info: List available meta-contexts
...@@ list_one_export (struct nbd_handle *nbd, const char *desc, /* Get description if list didn't already give us one */ if (!desc) desc = export_desc = nbd_get_export_description (nbd); - content = get_content (nbd, size); is_rotational = nbd_is_rotational (nbd); is_read_only = nbd_is_read_only (nbd); can_cache = nbd_can_cache (nbd); @@ -401,6 +435,12 @@ list_one_export (struct nbd_handle *nbd, const char *desc, block_minimum = nbd_get_block_size (nbd, LIBNBD_SIZE_MINIMUM); block_preferred = nbd_get_block_size (nbd, LIBNBD_SIZE_PREFERRED); block_maximum = nbd_get_block_size...
2019 Aug 15
3
[nbdkit PATCH] nbd: Another libnbd version bump
...+ if (nbd_add_meta_context (h->nbd, LIBNBD_CONTEXT_BASE_ALLOCATION) == -1) goto err; if (nbd_set_tls (h->nbd, tls) == -1) goto err; @@ -570,7 +572,7 @@ static int nbdplug_can_write (void *handle) { struct handle *h = handle; - int i = nbd_read_only (h->nbd); + int i = nbd_is_read_only (h->nbd); if (i == -1) { nbdkit_error ("failure to check readonly flag: %s", nbd_get_error ()); @@ -674,7 +676,7 @@ static int nbdplug_can_extents (void *handle) { struct handle *h = handle; - int i = nbd_can_meta_context (h->nbd, "base:allocation"); + in...
2023 Aug 03
1
[libnbd PATCH v4 20/25] generator: Actually request extended headers
...k "opt_go"; Link "opt_info"; Link "opt_list_meta_context"; Link "opt_set_meta_context"; Link "get_structured_replies_negotiated"; @@ -1404,11 +1405,11 @@ "opt_info", { If successful, functions like L<nbd_is_read_only(3)> and L<nbd_get_size(3)> will report details about that export. If L<nbd_set_request_meta_context(3)> is set (the default) and -structured replies were negotiated, it is also valid to use -L<nbd_can_meta_context(3)> after this call. However, it may be -more efficient to...
2020 Nov 05
1
[PATCH libnbd] copy: Allowing copying from NBD server to NBD server.
This patch is a straightforward refactoring of libnbd?s nbdcopy program, and not very interesting. However I have plans for nbdcopy (see full todo below). I would like to use this utility for virt-v2v as a replacement for ?qemu-img convert?. qemu-img has caused us a series of problems: - change in zeroing behaviour caused a big performance regression - qemu-img reads extents up-front which
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 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 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):