search for: cmd_flag_no_hol

Displaying 20 results from an estimated 20 matches for "cmd_flag_no_hol".

Did you mean: cmd_flag_no_hole
2019 May 28
1
Re: [PATCH] api: Add a special type for the flags argument.
...v", > "file", datafile]) > h.pwrite (buf1, 0, nbd.CMD_FLAG_FUA) There's still the question of how to pass two flags at once; if I understand your patch (and after confirming it with nbdsh), we have to write: h.zero (64*1024, 0, nbd.CMD_FLAG_FUA | nbd.CMD_FLAG_NO_HOLE) [side note - requires a server that supports flush; to my surprise, nbkdit 'null' does but 'memory' did not; I'll probably fix that] I don't know if we want to somehow allow: h.zero (64*1024, 0, nbd.CMD_FLAG_FUA, nbd.CMD_FLAG_NO_HOLE) instead (two arguments, each with...
2019 Nov 22
0
[PATCH nbdkit v2 10/10] tests: Test the Python plugin thoroughly.
...) + +h = test ({"size": 512, + "can_trim": True, "can_fua": "native", "trim_expect_fua": True}) +h.trim (512, 0, nbd.CMD_FLAG_FUA) + +# Test zero + flags. +h = test ({"size": 512, "can_zero": True}) +h.zero (512, 0, nbd.CMD_FLAG_NO_HOLE) + +h = test ({"size": 512, + "can_zero": True, "can_fua": "native", "zero_expect_fua": True}) +h.zero (512, 0, nbd.CMD_FLAG_NO_HOLE | nbd.CMD_FLAG_FUA) + +h = test ({"size": 512, "can_zero": True, "zero_expect_ma...
2019 Nov 22
3
Re: [PATCH nbdkit v2 10/10] tests: Test the Python plugin thoroughly.
.... With the dict does not fit in one line, or contains more than few keys it is more readable to use one key: value pair per line. > +h.trim (512, 0, nbd.CMD_FLAG_FUA) > + > +# Test zero + flags. > +h = test ({"size": 512, "can_zero": True}) > +h.zero (512, 0, nbd.CMD_FLAG_NO_HOLE) > + > +h = test ({"size": 512, > + "can_zero": True, "can_fua": "native", "zero_expect_fua": True}) > +h.zero (512, 0, nbd.CMD_FLAG_NO_HOLE | nbd.CMD_FLAG_FUA) > + > +h = test ({"size": 512, "can_zero&quo...
2019 Nov 22
18
[PATCH nbdkit v2 00/10] Implement nbdkit API v2 for Python plugins.
v1: https://www.redhat.com/archives/libguestfs/2019-November/msg00153.html v2: - Fix implementation of can_cache. - Add implementation of can_fua. - Add a very thorough test suite which tests every command + flag combination.
2019 May 28
0
[libnbd PATCH 4/4] api: Add DF flag support for pread
...uld otherwise allow a more efficient representation of +holes contained in the region (if that is supported - some servers +cannot do this, see C<nbd_can_df>)."; }; "pwrite", { @@ -1774,6 +1790,7 @@ let constants = [ "CMD_FLAG_FUA", 1 lsl 0; "CMD_FLAG_NO_HOLE", 1 lsl 1; + "CMD_FLAG_DF", 1 lsl 2; "CMD_FLAG_REQ_ONE", 1 lsl 3; ] diff --git a/lib/flags.c b/lib/flags.c index 421a7d2..cdbc28f 100644 --- a/lib/flags.c +++ b/lib/flags.c @@ -42,6 +42,11 @@ nbd_internal_set_size_and_flags (struct nbd_handle *h, r...
2019 May 28
2
[PATCH] api: Add a special type for the flags argument.
This applies on top of patches 1 & 2 here (instead of patch 3): https://www.redhat.com/archives/libguestfs/2019-May/msg00206.html https://www.redhat.com/archives/libguestfs/2019-May/msg00207.html Rich.
2019 Nov 25
7
[PATCH nbdkit v2 0/7] Implement nbdkit API v2 for Python plugins.
v3 was here: https://www.redhat.com/archives/libguestfs/2019-November/msg00209.html In v4: - Rebase on top of current master. Includes various fixes and updates required because of Nir's patches that went into master. - Fix api_version() -> API_VERSION in patch 2 noted previously on the mailing list. Rich.
2019 Jun 18
0
[libnbd PATCH 5/8] states: Wire in a read callback
...| 4 ++- 4 files changed, 62 insertions(+), 4 deletions(-) diff --git a/generator/generator b/generator/generator index 4c81859..2614689 100755 --- a/generator/generator +++ b/generator/generator @@ -1934,6 +1934,10 @@ let constants = [ "CMD_FLAG_FUA", 1 lsl 0; "CMD_FLAG_NO_HOLE", 1 lsl 1; "CMD_FLAG_REQ_ONE", 1 lsl 3; + + "READ_DATA", 1; + "READ_HOLE", 2; + "READ_ERROR", 3; ] (*----------------------------------------------------------------------*) diff --git a/generator/states-reply...
2019 Nov 23
8
[PATCH nbdkit v3 0/7] Implement nbdkit API v2 for Python plugins.
v2 was here: https://www.redhat.com/archives/libguestfs/2019-November/msg00163.html I pushed patch 1 (with spelling fix), patch 4 and patch 5 since those were previously ACKed on the list. Differences in v3: - Add error checking to PyModule_AddIntConstant. - Use API_VERSION constant instead of function. - Add max API version supported to --dump-plugin output. - Print API_VERSION selected by
2019 Oct 03
0
[nbdkit PATCH 2/4] tests: Test retry with different fua/fast-zero flags
...t retry-zero-flags-open-count +start_t=$SECONDS + +# Create a custom plugin which will test retrying. +nbdkit -v -U - \ + sh - \ + --filter=retry retry-delay=1 \ + --run 'nbdsh --uri $uri -c " +h.zero (512, 0) +try: + h.zero (512, 0, + nbd.CMD_FLAG_FUA | nbd.CMD_FLAG_NO_HOLE | nbd.CMD_FLAG_FAST_ZERO) +except nbd.Error as ex: + assert ex.errno == \"ENOTSUP\" +h.zero (512, 0, nbd.CMD_FLAG_FUA) + "' <<'EOF' +#!/usr/bin/env bash +case "$1" in + open) + # Count how many times the connection is (re-)opened. +...
2019 Jun 21
0
[libnbd PATCH v2 2/5] states: Wire in a read callback
...| 4 ++- 4 files changed, 63 insertions(+), 4 deletions(-) diff --git a/generator/generator b/generator/generator index 2d1a4e5..b408509 100755 --- a/generator/generator +++ b/generator/generator @@ -1934,6 +1934,10 @@ let constants = [ "CMD_FLAG_FUA", 1 lsl 0; "CMD_FLAG_NO_HOLE", 1 lsl 1; "CMD_FLAG_REQ_ONE", 1 lsl 3; + + "READ_DATA", 1; + "READ_HOLE", 2; + "READ_ERROR", 3; ] (*----------------------------------------------------------------------*) diff --git a/generator/states-reply...
2019 Jun 18
0
[libnbd RFC PATCH 9/8] wip: generator: Add ReadStatus enum type
...Status of string (* enum of pread_callback status *) | SockAddrAndLen of string * string (* struct sockaddr * + socklen_t *) | String of string (* string *) | StringList of string (* argv-style NULL-terminated array of strings *) @@ -2033,10 +2034,13 @@ let constants = [ "CMD_FLAG_NO_HOLE", 1 lsl 1; "CMD_FLAG_DF", 1 lsl 2; "CMD_FLAG_REQ_ONE", 1 lsl 3; - - "READ_DATA", 1; - "READ_HOLE", 2; - "READ_ERROR", 3; +] +let enums = [ + "nbd_read_status", [ + "READ_DA...
2019 Jun 21
0
[libnbd PATCH v2 5/5] states: Add DF flag support for pread
...than one fragment (if that is supported - some servers cannot do +this, see C<nbd_can_df>). Libnbd does not validate that the server +actually obeys the flag."; }; "pwrite", { @@ -2025,6 +2040,7 @@ let constants = [ "CMD_FLAG_FUA", 1 lsl 0; "CMD_FLAG_NO_HOLE", 1 lsl 1; + "CMD_FLAG_DF", 1 lsl 2; "CMD_FLAG_REQ_ONE", 1 lsl 3; "READ_DATA", 1; diff --git a/interop/structured-read.c b/interop/structured-read.c index ea47254..cf8b893 100644 --- a/interop/structured-read.c +++ b/interop/struct...
2019 Jun 20
1
Re: [libnbd RFC PATCH 9/8] wip: generator: Add ReadStatus enum type
...num of pread_callback status *) > | SockAddrAndLen of string * string (* struct sockaddr * + socklen_t *) > | String of string (* string *) > | StringList of string (* argv-style NULL-terminated array of strings *) > @@ -2033,10 +2034,13 @@ let constants = [ > "CMD_FLAG_NO_HOLE", 1 lsl 1; > "CMD_FLAG_DF", 1 lsl 2; > "CMD_FLAG_REQ_ONE", 1 lsl 3; > - > - "READ_DATA", 1; > - "READ_HOLE", 2; > - "READ_ERROR", 3; > +] > +let enums = [ > + &quo...
2019 Aug 10
0
[PATCH libnbd 2/9] generator: Generalize OFlags.
...2385,12 @@ C<nbd_aio_connect_uri>."; ] -(* Constants, flags, etc. *) +(* Constants, etc. *) let constants = [ "AIO_DIRECTION_READ", 1; "AIO_DIRECTION_WRITE", 2; "AIO_DIRECTION_BOTH", 3; - "CMD_FLAG_FUA", 1 lsl 0; - "CMD_FLAG_NO_HOLE", 1 lsl 1; - "CMD_FLAG_DF", 1 lsl 2; - "CMD_FLAG_REQ_ONE", 1 lsl 3; - "READ_DATA", 1; "READ_HOLE", 2; "READ_ERROR", 3; @@ -3373,7 +3384,7 @@ let rec print_arg_list ?(handle = false) ?(types...
2019 Oct 03
7
[nbdkit PATCH 0/4] More work with retry safety
I'm still working on another set of patches to have reopen call .finalize/.prepare (so that another filter can safely appear between retry and the plugin), but for tonight, these are the patches I think are ready to go. Eric Blake (4): retry: Handle can_fua and can_fast_zero changes tests: Test retry with different fua/fast-zero flags server: Close backends if a filter's .open fails
2019 Jun 21
9
[libnbd PATCH v2 0/5] nbd_pread_structured
Since v1: - rebase to applied patches - split out support for Int in callbacks - sort of test that callbacks work in OCaml (see comment in patch 5) - rename API to nbd_pread_structured - expose error as explicit parameter to callback Eric Blake (5): generator: Allow Int in callbacks states: Wire in a read callback states: Add nbd_pread_structured API states: Add tests for
2019 Jun 18
17
[libnbd PATCH 0/8] Add nbd_pread_callback
I've mentioned this topic before (in fact, the idea of adding NBD_CMD_FLAG_DF was first mentioned at [1]), but finally finished enough of an implementation to feel confident in posting it. I'd still like to add something under examples/ that uses the new API to implement strict checking of a server's structured replies read implementation (ensure that a server never sends data after
2019 May 28
6
[RFC libnbd PATCH 0/4] Add CMD_FLAG_DF support
RFC because this is an API break, but we haven't declared stable API yet. If we like it, I'm working on using libnbd to implement the nbdkit-nbd plugin; knowing whether it is API version 0.1 or 0.2 will be useful. I also dabbled with allowing optional parameters in python, although my OCaml is weak enough that there may be cleaner ways to approach that. Eric Blake (4): api: Add flags
2019 Aug 10
17
[PATCH libnbd 0/9] Add Enum and Flags types.
This largish series adds several new features to the generator. Enum maps to enumerated types (like enum in C). The only current use for this is replacing the nbd_set_tls (nbd, 0/1/2) parameter with LIBNBD_TLS_DISABLE, LIBNBD_TLS_ALLOW, LIBNBD_TLS_REQUIRE (and natural equivalents in other programming languages). Flags maps to any uint32_t bitmask. It is basically a non-optional, generalized