search for: is_read_on

Displaying 20 results from an estimated 38 matches for "is_read_on".

Did you mean: is_read_only
2020 Oct 06
2
[PATCH libnbd] info: Write output atomically.
...if (is_rotational >= 0) - printf ("\t%s: %s\n", "is_rotational", is_rotational ? "true" : "false"); + fprintf (fp, "\t%s: %s\n", "is_rotational", + is_rotational ? "true" : "false"); if (is_read_only >= 0) - printf ("\t%s: %s\n", "is_read_only", is_read_only ? "true" : "false"); + fprintf (fp, "\t%s: %s\n", "is_read_only", + is_read_only ? "true" : "false"); if (can_cache >= 0) -...
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
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 Mar 17
0
[nbdkit PATCH 4/4] RFC tests: Add test to cover unusual .can_flush return
...r as ex: + exit (0) +# If we got here, things are broken +exit (1) +' + +# A read-only connection never triggers .can_flush +nbdsh -c ' +h.connect_command (["nbdkit", "-s", "-r", "-v", "'$plugin'", "level=-1"]) +assert h.is_read_only () == 1 +assert h.can_flush () == 0 +assert h.can_fua () == 0 +' + +# Disable flush and FUA +nbdsh -c ' +h.connect_command (["nbdkit", "-s", "-v", "'$plugin'", "0"]) +assert h.is_read_only () == 0 +assert h.can_flush () == 0 +asser...
2019 Aug 06
0
[PATCH libnbd 1/3] api: Change nbd_read_only -> nbd_is_read_only.
...--git a/docs/libnbd.pod b/docs/libnbd.pod index 74227fd..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....
2020 Sep 22
3
[libnbd PATCH v2] nbdsh: Catch nbd.Error from -c arguments
...; test-error.err +grep '^nbdsh: unable to connect to uri.*nosuchsock' $err + +# Triggering nbd.Error non-interactively (via -c) prints the error. The +# output 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....
2020 Oct 02
0
[libnbd PATCH v2 2/2] info: List available meta-contexts
...f1c9fd..10bbac0 100755 --- a/info/info-json.sh +++ b/info/info-json.sh @@ -33,3 +33,5 @@ jq . < $out test $( jq -r '.protocol' < $out ) != "newstyle" test $( jq -r '.exports[0]."export-size"' < $out ) != "null" test $( jq -r '.exports[0].is_read_only' < $out ) = "true" +test $( jq -r '.exports[0].contexts[] | select(. == "base:allocation")' \ + < $out ) = "base:allocation" diff --git a/info/info-list-json.sh b/info/info-list-json.sh index 4cf5cc0..dc4d25a 100755 --- a/info/info-list-json.sh +...
2020 Sep 11
0
[libnbd PATCH v2 3/5] api: Add nbd_set_strict_mode
...ing 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...
2020 Sep 18
1
[libnbd PATCH] nbdsh: Hide nbd.Error from abrt-python3-handler
..., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +# Test how nbdsh -c handles errors +fail=0 + +. ../tests/functions.sh + +files='test-error.out test-error.err' +cleanup_fn rm -f $files +rm -f $files + +# 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
2019 Aug 06
5
[PATCH libnbd 0/3] One API and small documentation changes.
One API change, some small documentation changes.
2020 Mar 17
9
[nbdkit PATCH 0/4] Fix testsuite hang with nbd-stadalone
Either patch 1 or patch 2 in isolation is sufficient to fix the problem that Rich forwarded on from an archlinux tester (name so I can credit them?). But both patches should be applied, as well as backported to appropriate stable branches, to maximize cross-version interoperability of nbdkit vs. plugins. Patch 3 will let us detect future similar bugs much faster. I want patch 4 to ensure that
2020 Jul 24
0
[libnbd PATCH 3/3] nbdinfo: Expose block size constraints
..."block_size_maximum": 33554432, "export-size": 2125119488 } ] diff --git a/info/nbdinfo.c b/info/nbdinfo.c index 455cfc8..4c58815 100644 --- a/info/nbdinfo.c +++ b/info/nbdinfo.c @@ -264,6 +264,7 @@ list_one_export (struct nbd_handle *nbd) int is_rotational, is_read_only; int can_cache, can_df, can_fast_zero, can_flush, can_fua, can_multi_conn, can_trim, can_zero; + int64_t block_minimum, block_preferred, block_maximum; /* Collect the metadata we are going to display. */ size = nbd_get_size (nbd); @@ -288,6 +289,9 @@ list_one_export (struct nbd_ha...
2019 Nov 22
0
[PATCH nbdkit v2 10/10] tests: Test the Python plugin thoroughly.
...h.is_rotational() + +h = test ({"size": 512, "can_multi_conn": True}) +assert h.can_multi_conn() +h = test ({"size": 512, "can_multi_conn": False}) +assert not h.can_multi_conn() + +h = test ({"size": 512, "can_write": True}) +assert not h.is_read_only() +h = test ({"size": 512, "can_write": False}) +assert h.is_read_only() + +h = test ({"size": 512, "can_flush": True}) +assert h.can_flush() +h = test ({"size": 512, "can_flush": False}) +assert not h.can_flush() + +h = test ({"siz...
2019 Aug 15
1
[PATCH libnbd] api: Rename nbd_kill_command -> nbd_kill_subprocess.
...15,7 @@ Run the command as a subprocess and connect to it over stdin/stdout. This is for use with NBD servers which can behave like inetd clients, such as C<nbdkit --single>. -See also L<nbd_kill_command(3)>."; +See also L<nbd_kill_subprocess(3)>."; }; "is_read_only", { @@ -2249,7 +2249,7 @@ The release number is incremented for each release along a particular branch."; }; - "kill_command", { + "kill_subprocess", { default_call with args = [ Int "signum" ]; ret = RErr; shortdesc = "kill serv...
2019 Nov 22
3
Re: [PATCH nbdkit v2 10/10] tests: Test the Python plugin thoroughly.
...({"size": 512, "can_multi_conn": True}) > +assert h.can_multi_conn() > +h = test ({"size": 512, "can_multi_conn": False}) > +assert not h.can_multi_conn() > + > +h = test ({"size": 512, "can_write": True}) > +assert not h.is_read_only() > +h = test ({"size": 512, "can_write": False}) > +assert h.is_read_only() > + > +h = test ({"size": 512, "can_flush": True}) > +assert h.can_flush() > +h = test ({"size": 512, "can_flush": False}) > +assert not h....
2020 Jul 24
4
[libnbd PATCH 0/3] Expose server block size constraints
Necessary when writing a client that wants to avoid unnecessary EINVAL errors from sending unaligned requests. At some point, we may want to add synchronous convenience API wrappers that do request splitting or read-modify-write to obey server constraints while still appearing to the library client as accepting any possible request. But such a wrapper should only be synchronous and not copied to
2019 Sep 05
0
[PATCH libnbd] generator: Move first_version fields to a single table.
...quot;, (1, 0); + "set_tls_psk_file", (1, 0); + (*"get_tls_psk_file", (1, 0);*) + "add_meta_context", (1, 0); + "connect_uri", (1, 0); + "connect_unix", (1, 0); + "connect_tcp", (1, 0); + "connect_command", (1, 0); + "is_read_only", (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); + &quot...
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 ++++++++-
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.
2007 Apr 02
2
Re: Test driving WxRuby2 apps
Apologies, I think the gem attachment may have been stripped from my original mail, so I''ve uploaded it to rubyforge under a new ''wxextra''s project: http://rubyforge.org/projects/wxextras/ (direct link: http://rubyforge.org/frs/download.php/19183/nobbie-wx-preview-0.0.1.gem) p. ============================================================ Before I forget, thanks