search for: generate_lib_libnbd_syms

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

2019 Aug 11
3
[PATCH libnbd proposal] api: Add semi-private function for freeing persistent data.
...098976309a6af883d245fc56. --- generator/generator | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/generator/generator b/generator/generator index 55c4dfc..0ea6b61 100755 --- a/generator/generator +++ b/generator/generator @@ -3284,6 +3284,7 @@ let generate_lib_libnbd_syms () = pr "LIBNBD_%d.%d {\n" major minor; pr " global:\n"; if (major, minor) = (1, 0) then ( + pr " nbd_add_free_callback;\n"; pr " nbd_create;\n"; pr " nbd_close;\n"; pr " nbd_g...
2019 Aug 15
0
[PATCH libnbd v2 10/10] generator: Check requirements for BytesPersistIn/Out and completion callbacks.
...s: multiple BytesPersistIn/Out params not supported" + name; + if not (List.exists is_oclosure_completion optargs) then + failwithf "%s: functions with BytesPersistIn/Out arg must have completion callback" + name + ) ) handle_calls let generate_lib_libnbd_syms () = -- 2.22.0
2019 Aug 12
0
Re: [PATCH libnbd proposal] api: Add semi-private function for freeing persistent data.
...rator/generator | 46 +++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 46 insertions(+) > > diff --git a/generator/generator b/generator/generator > index 55c4dfc..0ea6b61 100755 > --- a/generator/generator > +++ b/generator/generator > @@ -3284,6 +3284,7 @@ let generate_lib_libnbd_syms () = > pr "LIBNBD_%d.%d {\n" major minor; > pr " global:\n"; > if (major, minor) = (1, 0) then ( > + pr " nbd_add_free_callback;\n"; > pr " nbd_create;\n"; > pr " nbd_close;\n&quot...
2019 Jul 25
0
[PATCH libnbd v3 2/2] lib: Remove nbd_add_close_callback.
...-- lib/handle.c | 35 ----------------------------------- lib/internal.h | 10 ---------- 3 files changed, 63 deletions(-) diff --git a/generator/generator b/generator/generator index 7aad57c..92a1aae 100755 --- a/generator/generator +++ b/generator/generator @@ -3055,7 +3055,6 @@ let generate_lib_libnbd_syms () = pr "{\n"; pr " global:\n"; - pr " nbd_add_close_callback;\n"; pr " nbd_create;\n"; pr " nbd_close;\n"; pr " nbd_get_errno;\n"; @@ -3255,11 +3254,6 @@ let generate_include_libnbd_h () = pr "extern...
2019 Jul 27
3
[PATCH libnbd] lib: Use symbol versions.
This patch adds support for symbol versions. It is based on what libvirt does. The generated syms file looks like: LIBNBD_1.0 { global: nbd_...; nbd_...; local: *; }; In a future stable 1.2 release, new symbols would go into a new section which would look like this: LIBNBD_1.2 { global: nbd_new_symbol; nbd_another_new_symbol; local: *; } LIBNBD_1.0; In my testing the
2019 Aug 12
0
[PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
...+++++++++++++++++++++++++++++++++++ lib/handle.c | 6 +++ lib/internal.h | 14 +++++ 5 files changed, 207 insertions(+) diff --git a/generator/generator b/generator/generator index c52200b..d6b9352 100755 --- a/generator/generator +++ b/generator/generator @@ -3284,6 +3284,7 @@ let generate_lib_libnbd_syms () = pr "LIBNBD_%d.%d {\n" major minor; pr " global:\n"; if (major, minor) = (1, 0) then ( + pr " nbd_add_free_callback;\n"; pr " nbd_create;\n"; pr " nbd_close;\n"; pr " nbd_g...
2019 May 28
0
[PATCH] api: Add a special type for the flags argument.
...match args with + | [] -> () + | Flags _ :: xs + | xs -> + if List.exists (function Flags _ -> true | _ -> false) xs then + failwithf "%s: Flags must appear in final argument position only" + name + ) handle_calls + let generate_lib_libnbd_syms () = generate_header HashStyle; @@ -2517,6 +2533,7 @@ let rec name_of_arg = function | BytesPersistIn (n, len) -> [n; len] | BytesPersistOut (n, len) -> [n; len] | Callback (n, _) -> [n] +| Flags n -> [n] | Int n -> [n] | Int64 n -> [n] | Opaque n -> [n] @@ -2548,6 +...
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 Jul 16
1
Re: [PATCH libnbd v2] generator: Define new Closure type instead of callbacks.
...cbargs=[String "metacontext"; and a third here (list starts with '[ {', and cbargs has no space). Probably worth picking a style you like and then using it consistently, but that's cosmetic and doesn't affect the patch's operation. > @@ -3143,19 +3151,19 @@ let generate_lib_libnbd_syms () = > pr " local: *;\n"; > pr "};\n" > > -let rec name_of_arg = function > -| ArrayAndLen (arg, n) -> name_of_arg arg @ [n] > +let rec c_name_of_arg = function > +| ArrayAndLen (arg, n) -> c_name_of_arg arg @ [n] > | Bool n -> [n] >...
2019 Jul 16
2
[PATCH libnbd] generator: Define new Closure type
** INCOMPLETE ** This is the generator change as discussed on the list already. The Python and OCaml bindings are not yet done. It passes all [C only] tests and valgrind. Note that nbd_add_close_callback is inconsistent with other closure types because it passes the user_data parameter after the function. (This is not caused by the current patch, it was already inconsistent). We decided that
2019 Jul 16
2
[PATCH libnbd v2] generator: Define new Closure type
As before, but this one has working Python bindings. OCaml still TBD. Rich.
2019 Aug 15
13
[PATCH libnbd v2 00/10] Callbacks and OCaml and Python persistent buffers.
This is a combination of these two earlier series: https://www.redhat.com/archives/libguestfs/2019-August/msg00235.html https://www.redhat.com/archives/libguestfs/2019-August/msg00240.html plus changes to allow .callback = NULL / .free != NULL, and to reduce the complexity of freeing callbacks. Although it's rather long there's nothing complex here. We might consider squashing some
2019 Jul 16
0
[PATCH libnbd v2] generator: Define new Closure type instead of callbacks.
...uot;error")]}; + {cbname="callback"; + cbargs=[Int64 "cookie"; Mutable (Int "error")]} ]); Flags "flags" ]; ret = RInt64; permitted_states = [ Connected ]; @@ -3143,19 +3151,19 @@ let generate_lib_libnbd_syms () = pr " local: *;\n"; pr "};\n" -let rec name_of_arg = function -| ArrayAndLen (arg, n) -> name_of_arg arg @ [n] +let rec c_name_of_arg = function +| ArrayAndLen (arg, n) -> c_name_of_arg arg @ [n] | Bool n -> [n] | BytesIn (n, len) -> [n; len] | BytesO...
2019 Jul 25
4
[PATCH libnbd v3 0/2] lib: Implement closure lifetimes.
I think I've addressed everything that was raised in review. Some of the highlights: - Callbacks should be freed reliably along all exit paths. - There's a simple test of closure lifetimes. - I've tried to use VALID|FREE in all the places where I'm confident that it's safe and correct to do. There may be more places. Note this is an optimization and shouldn't
2019 Aug 12
14
[PATCH libnbd 0/7] Add free callbacks and remove valid_flag.
As proposed here: https://www.redhat.com/archives/libguestfs/2019-August/msg00130.html I didn't actually read Eric's replies to that yet because I've been concentrating on writing these patches all day. Anyway here they are and I'll look at what Eric said about the proposal next. Rich.
2019 Jul 24
8
[PATCH libnbd v2 0/5] lib: Implement closure lifetimes.
v1 was here: https://www.redhat.com/archives/libguestfs/2019-July/thread.html#00231 The changes address everything that Eric picked up in his review of the first two patches. I have also added two more patches (4 and 5) which respectively fix docs and change int status -> unsigned status, as discussed. Passes make, check, check-valgrind. Rich.
2019 Jul 24
6
[PATCH libnbd 0/3] Implement closure lifetimes.
This implements most of what I wrote here: https://www.redhat.com/archives/libguestfs/2019-July/msg00213.html
2019 May 23
2
[PATCH libnbd] api: Get rid of nbd_connection.
This isn't quite finished because not all of the tests or examples have been updated, but it demonstrates an idea: Should we forget about the concept of having multiple connections managed under a single handle? In this patch there is a single ‘struct nbd_handle *’ which manages a single state machine and connection (and therefore no nbd_connection). To connect to a multi-conn server you must