search for: oflag

Displaying 20 results from an estimated 181 matches for "oflag".

Did you mean: flag
2020 Sep 11
0
[libnbd PATCH v2 2/5] generator: Refactor filtering of accepted OFlags
...--------------------------------- 8 files changed, 67 insertions(+), 96 deletions(-) diff --git a/generator/API.ml b/generator/API.ml index 42eeac0..b212e95 100644 --- a/generator/API.ml +++ b/generator/API.ml @@ -55,7 +55,7 @@ and arg = | UInt64 of string and optarg = | OClosure of closure -| OFlags of string * flags +| OFlags of string * flags * string list option and ret = | RBool | RStaticString @@ -1485,7 +1485,11 @@ Future NBD extensions may result in additional C<size_type> values. "pread", { default_call with args = [ BytesOut ("buf", "cou...
2019 Aug 10
0
[PATCH libnbd 2/9] generator: Generalize OFlags.
In a future commit we want to add (non-optional) Flags arg. As a step to doing this, generalize OFlags so it's not tied to just NBD_CMD_FLAG_*. This does not change the C API. It does introduce a small change to the OCaml API -- putting related flags into a submodule, basically renaming them. Note we don't provide guarantees for non-C APIs. --- generator/generator |...
2019 Aug 13
0
[PATCH libnbd v2 1/3] generator: Implement OClosure.
...r/generator index 8cf95b6..8f15786 100755 --- a/generator/generator +++ b/generator/generator @@ -867,6 +867,7 @@ and arg = | UInt32 of string (* 32 bit unsigned int *) | UInt64 of string (* 64 bit unsigned int *) and optarg = +| OClosure of closure (* optional closure *) | OFlags of string * flags (* optional flags, uint32_t in C *) and ret = | RBool (* return a boolean, or error *) @@ -3184,16 +3185,6 @@ end = struct (* Check the API definition. *) let () = - (* Currently optargs can only be [] or [OFlags]. This condition - * will be relaxed l...
2019 Aug 13
0
[PATCH libnbd 5/6] generator: Implement OClosure.
...r/generator index 01da1c3..3add9a4 100755 --- a/generator/generator +++ b/generator/generator @@ -867,6 +867,7 @@ and arg = | UInt32 of string (* 32 bit unsigned int *) | UInt64 of string (* 64 bit unsigned int *) and optarg = +| OClosure of closure (* optional closure *) | OFlags of string * flags (* optional flags, uint32_t in C *) and ret = | RBool (* return a boolean, or error *) @@ -3184,16 +3185,6 @@ end = struct (* Check the API definition. *) let () = - (* Currently optargs can only be [] or [OFlags]. This condition - * will be relaxed l...
2019 Aug 13
7
[PATCH libnbd v2 0/3] Implement OClosures.
v1 was here: https://www.redhat.com/archives/libguestfs/2019-August/msg00168.html I pushed uncontroversial patches 1-4 v2: - The implementation of OClosure (new patch 1) in Python is fixed. - Patch 2 (old patch 5) is unchanged. - I added a new API for removing debug callbacks. I think this approach has some advantages over using OClosure. - I didn't yet do any work on changing the
2020 Sep 11
10
[libnbd PATCH v2 0/5] Add knobs for client- vs. server-side validation
...TE - 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 nbd_set_strict_mode api: Add STRICT_FLAGS to set_strict_mode api: Add STRICT_BOUNDS/ZERO_SIZE to nbd_set_strict_mode docs/libnbd.pod | 7 + lib/internal.h | 6 +- generator/API.ml | 291 +...
2019 Aug 10
17
[PATCH libnbd 0/9] Add Enum and Flags types.
.... 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 variation on OFlags with some nice features. Two commits also add checking so that we check that the Enum, Flags or OFlags parameters don't contain values which are invalid at the time of compilation. This breaks new caller / old DLL at runtime (which may not be a bad thing). Note that at least patch #9 and ma...
2019 Aug 13
0
[PATCH libnbd 6/6] lib: Make all completion callbacks into OClosures.
...erator +++ b/generator/generator @@ -1836,9 +1836,8 @@ C<nbd_pread>."; "aio_pread_callback", { default_call with - args = [ BytesPersistOut ("buf", "count"); UInt64 "offset"; - Closure completion_closure ]; - optargs = [ OFlags ("flags", cmd_flags) ]; + args = [ BytesPersistOut ("buf", "count"); UInt64 "offset" ]; + optargs = [ OClosure completion_closure; OFlags ("flags", cmd_flags) ]; ret = RInt64; permitted_states = [ Connected ]; shortdesc = &quot...
2019 Aug 13
0
[PATCH libnbd v2 2/3] lib: Make all completion callbacks into OClosures.
...erator +++ b/generator/generator @@ -1836,9 +1836,8 @@ C<nbd_pread>."; "aio_pread_callback", { default_call with - args = [ BytesPersistOut ("buf", "count"); UInt64 "offset"; - Closure completion_closure ]; - optargs = [ OFlags ("flags", cmd_flags) ]; + args = [ BytesPersistOut ("buf", "count"); UInt64 "offset" ]; + optargs = [ OClosure completion_closure; OFlags ("flags", cmd_flags) ]; ret = RInt64; permitted_states = [ Connected ]; shortdesc = &quot...
2019 Aug 09
0
[PATCH libnbd 2/2] generator: Change handling of Flags to be a true optional argument.
...ptional arguments in languages that support them such as Python. This commit adds a new concept of optargs. At the moment it is simply limited to handling the optional (in some bindings) flags parameter which is used to handle the NBD_CMD_FLAG_* flags. If present, the old Flags parameter becomes OFlags and is moved into the optargs list. For the OCaml generation this change simplifies things considerably as we no longer need the mapping from C arg to ocaml_arg (they are now the same). In the libguestfs C bindings the handling of optargs is rather complex, and I don't intend to replicate th...
2019 Aug 13
12
[PATCH 0/6] Implement OClosure.
Patches 1-4 are basically uncontroversial, straightforward refactoring and IMHO we should just push them. Possibly 1-3 should be squashed together, but I posted them separately so they are easier to review. Patches 5 and 6 together implement OClosure. Patch 5 adds the feature and is simple to understand. Patch 6 changes the Closure completion callbacks into OClosure, but because it doesn't
2019 Aug 13
0
[PATCH libnbd 1/6] generator: Share single list of all Closures.
...- cbargs=[CBBytesIn ("subbuf", "count"); - CBUInt64 "offset"; CBUInt "status"; - CBMutable (Int "error")] } ]; + Closure chunk_closure ]; optargs = [ OFlags ("flags", cmd_flags) ]; ret = RErr; permitted_states = [ Connected ]; @@ -1641,13 +1663,7 @@ punching a hole."; "block_status", { default_call with - args = [ UInt64 "count"; UInt64 "offset"; - Closure { cbname="e...
2019 Aug 10
1
Re: [PATCH libnbd 2/9] generator: Generalize OFlags.
On 8/10/19 8:02 AM, Richard W.M. Jones wrote: > In a future commit we want to add (non-optional) Flags arg. As a step > to doing this, generalize OFlags so it's not tied to just > NBD_CMD_FLAG_*. > > This does not change the C API. > > It does introduce a small change to the OCaml API -- putting related > flags into a submodule, basically renaming them. Note we don't > provide guarantees for non-C APIs. And even if...
2016 Dec 05
0
Huge write amplification with thin provisioned logical volumes
...600 -2 TB) on which I create a thinly provisioned logical volume: pvcreate /dev/nvme0n1 vgcreate vgg /dev/nvme0n1 lvcreate -l100%FREE -T vgg/thinpool lvcreate -V40000M -T vgg/thinpool -n brick1 mkfs.xfs /dev/vgg/brick1 If I run a write test ( dd if=/dev/zero of=./zero.img bs=4k count=100000 oflag=dsync ) I see in iotop that the actual disk write is 30 times the amount of data that I'm actually writing to disk). Total DISK READ: 0.00 B/s | Total DISK WRITE: 1001.23 M/s TIME TID PRIO USER DISK READ DISK WRITE SWAPIN IO COMMAND 10:59:53 34453 be/4 root 0.00 B/s...
2019 Aug 10
2
Re: [PATCH libnbd 7/9] generator: On entry to API functions, check Flags and OFlags parameters.
On 8/10/19 8:02 AM, Richard W.M. Jones wrote: > Generate checks that no unknown (at the time of compilation) flags are > passed to Flags or OFlags parameters. > --- > generator/generator | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) We may still want to introduce a testing mode where you can use libnbd to drive unknown flags to a server that understands them, for experimenting with protocol extensions not yet inclu...
2019 Aug 10
0
[PATCH libnbd 7/9] generator: On entry to API functions, check Flags and OFlags parameters.
Generate checks that no unknown (at the time of compilation) flags are passed to Flags or OFlags parameters. --- generator/generator | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/generator/generator b/generator/generator index 96d1148..a6aea26 100755 --- a/generator/generator +++ b/generator/generator @@ -3689,6 +3689,19 @@ let generate_lib_api_c () = );...
2019 Aug 11
0
Re: [PATCH libnbd 7/9] generator: On entry to API functions, check Flags and OFlags parameters.
On Sat, Aug 10, 2019 at 04:38:20PM -0500, Eric Blake wrote: > On 8/10/19 8:02 AM, Richard W.M. Jones wrote: > > Generate checks that no unknown (at the time of compilation) flags are > > passed to Flags or OFlags parameters. > > --- > > generator/generator | 20 ++++++++++++++++++++ > > 1 file changed, 20 insertions(+) > > We may still want to introduce a testing mode where you can use libnbd > to drive unknown flags to a server that understands them, for > experimenting wit...
2019 Aug 11
1
Re: [PATCH libnbd 7/9] generator: On entry to API functions, check Flags and OFlags parameters.
...hem - there are still > > checks that depend on runtime values, such as nbd_pread accepting _DF > > only if the server advertises it after the client requests structured > > replies). Also, this lets us pass all four existing command flags to > > all commands that accept an OFlags parameter, even though none of the > > commands accept all flags at once - the real protection being added here > > is the check for completely unrecognized flags. > > Right - this doesn't replace fine-grained checks in the functions > themselves. I'll have a look at...
2019 Aug 09
4
[PATCH libnbd 0/2] generator: Preparatory changes to the generator.
These are some simplifications to the generator. They don't probably make much sense on their own, but they are preparatory to better handling of enums, and or'd lists of flags. Rich.
2004 Feb 21
0
Solaris interposer code for nsswitch.conf
...*)(const char*, const char *))dlsym(RTLD_NEXT, "fopen64"); if(strcmp(fpath,"/etc/nsswitch.conf")==0) fpath = "/etc/nsswitch_samba.conf"; printf(" calling fopen64(%s, %s)\n", fpath, mode); return(func(fpath, mode)); } int open(const char *path, int oflag ){ static int (*func)(const char*, int); if(!func) func = ( int (*)(const char*, int))dlsym(RTLD_NEXT, "open"); if(strcmp(path,"/etc/nsswitch.conf")==0) path = "/etc/nsswitch_samba.conf"; printf(" calling open(%s, %d)\n", path, oflag); return(...