search for: thread_model_serialize_all_request

Displaying 14 results from an estimated 14 matches for "thread_model_serialize_all_request".

2019 Aug 15
2
[nbdkit PATCH] ocaml: Add support for dynamic .thread_model
...s, this is OCaml code: -*- tuareg -*- *) (* nbdkit OCaml interface * Copyright (C) 2014-2019 Red Hat Inc. * @@ -39,6 +40,12 @@ type fua_flag = FuaNone | FuaEmulate | FuaNative type cache_flag = CacheNone | CacheEmulate | CacheNop +type thread_model = +| THREAD_MODEL_SERIALIZE_CONNECTIONS +| THREAD_MODEL_SERIALIZE_ALL_REQUESTS +| THREAD_MODEL_SERIALIZE_REQUESTS +| THREAD_MODEL_PARALLEL + type extent = { offset : int64; length : int64; @@ -87,6 +94,8 @@ type 'a plugin = { can_cache : ('a -> cache_flag) option; cache : ('a -> int32 -> int64 -> flags -> unit) option; + + thread_mod...
2019 Nov 22
2
Re: [PATCH nbdkit v2 02/10] python: Add various constants to the API.
...caller decref the module object and return NULL. See https://github.com/nirs/sanlock/blob/53f7f0284c084ac2e4542fd1f71d0406075adb5d/python/sanlock.c#L1846 https://github.com/nirs/sanlock/blob/53f7f0284c084ac2e4542fd1f71d0406075adb5d/python/sanlock.c#L1763 > + PyModule_AddIntConstant (m, "THREAD_MODEL_SERIALIZE_ALL_REQUESTS", > + NBDKIT_THREAD_MODEL_SERIALIZE_ALL_REQUESTS); > + PyModule_AddIntConstant (m, "THREAD_MODEL_SERIALIZE_REQUESTS", > + NBDKIT_THREAD_MODEL_SERIALIZE_REQUESTS); > + PyModule_AddIntConstant (m, "THREAD_MODEL_PAR...
2019 Nov 22
1
Re: [PATCH nbdkit v2 02/10] python: Add various constants to the API.
...if we are not careful, so it is best avoided. It is nice to decref and return NULL, the user code will fail with nice traceback about (likely) MemoryError. And it does not cost much to do the right thing. > > Thanks, > > Rich. > > > > + PyModule_AddIntConstant (m, "THREAD_MODEL_SERIALIZE_ALL_REQUESTS", > > > + NBDKIT_THREAD_MODEL_SERIALIZE_ALL_REQUESTS); > > > + PyModule_AddIntConstant (m, "THREAD_MODEL_SERIALIZE_REQUESTS", > > > + NBDKIT_THREAD_MODEL_SERIALIZE_REQUESTS); > > > + PyModule_A...
2019 Nov 22
0
[PATCH nbdkit v2 02/10] python: Add various constants to the API.
...e nbdkit API module"); exit (EXIT_FAILURE); } + + /* Constants corresponding to various flags. */ + PyModule_AddIntConstant (m, "THREAD_MODEL_SERIALIZE_CONNECTIONS", + NBDKIT_THREAD_MODEL_SERIALIZE_CONNECTIONS); + PyModule_AddIntConstant (m, "THREAD_MODEL_SERIALIZE_ALL_REQUESTS", + NBDKIT_THREAD_MODEL_SERIALIZE_ALL_REQUESTS); + PyModule_AddIntConstant (m, "THREAD_MODEL_SERIALIZE_REQUESTS", + NBDKIT_THREAD_MODEL_SERIALIZE_REQUESTS); + PyModule_AddIntConstant (m, "THREAD_MODEL_PARALLEL", +...
2019 Nov 22
0
Re: [PATCH nbdkit v2 02/10] python: Add various constants to the API.
...n make this change. It's worth it in case there is some subtle Python API change in future that we need to be aware of. We can in fact exit if load() fails so I guess we don't need to bother doing the PY_DECREF for this case. Thanks, Rich. > > + PyModule_AddIntConstant (m, "THREAD_MODEL_SERIALIZE_ALL_REQUESTS", > > + NBDKIT_THREAD_MODEL_SERIALIZE_ALL_REQUESTS); > > + PyModule_AddIntConstant (m, "THREAD_MODEL_SERIALIZE_REQUESTS", > > + NBDKIT_THREAD_MODEL_SERIALIZE_REQUESTS); > > + PyModule_AddIntConstant (m, &q...
2019 Sep 19
1
Re: [PATCH nbdkit v3 1/3] filters: Implement next_ops .reopen call.
On 9/19/19 10:26 AM, Richard W.M. Jones wrote: > This is intended for use by the forthcoming retry filter to close and > reopen the backend chain. It is handled entirely by server/backend.c > as no cooperation is needed with the plugin. > > Note the explicit readonly parameter: An alternative would be to store > the previous readonly setting in the b_conn_handle struct.
2020 Sep 01
0
[nbdkit PATCH 2/2] ocaml: Implement .list_exports and friends
...DKit.mli @@ -51,6 +51,12 @@ type extent = { } (** The type of the extent list returned by [.extents]. *) +type export = { + name : string; + description : string; +} +(** The type of the export list returned by [.list_exports]. *) + type thread_model = | THREAD_MODEL_SERIALIZE_CONNECTIONS | THREAD_MODEL_SERIALIZE_ALL_REQUESTS @@ -78,10 +84,13 @@ type 'a plugin = { after_fork : (unit -> unit) option; preconnect : (bool -> unit) option; + list_exports : (bool -> bool -> export list) option; + default_export : (bool -> bool -> string) option; open_connection : (bool -> 'a) option;...
2020 Sep 21
0
[nbdkit PATCH v3 14/14] ocaml: Implement .list_exports and friends
...i @@ -51,6 +51,12 @@ type extent = { } (** The type of the extent list returned by [.extents]. *) +type export = { + name : string; + description : string option; +} +(** The type of the export list returned by [.list_exports]. *) + type thread_model = | THREAD_MODEL_SERIALIZE_CONNECTIONS | THREAD_MODEL_SERIALIZE_ALL_REQUESTS @@ -78,10 +84,13 @@ type 'a plugin = { after_fork : (unit -> unit) option; preconnect : (bool -> unit) option; + list_exports : (bool -> bool -> export list) option; + default_export : (bool -> bool -> string) option; open_connection : (bool -> 'a) option;...
2020 Sep 01
4
[nbdkit PATCH 0/2] More language bindings for .list_exports
This picks up python and ocaml. Some of our languages are lacking a number of bindings (for example, lua and perl lack .extents, so I didn't have anything to copy from), and I felt less comfortable with golang and rust. But for python and ocaml, I was able to test a working implementation. Eric Blake (2): python: Implement .list_exports and friends ocaml: Implement .list_exports and
2019 Nov 21
10
[PATCH nbdkit 0/8] Implement nbdkit API v2 for Python plugins.
And fill out most of the missing bits of the API. Rich.
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 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 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
2020 Sep 21
18
[nbdkit PATCH v3 00/14] exportname filter
It's been several weeks since I posted v2 (I got distracted by improving libnbd to better test things, which in turn surfaced some major memory leak problems in nbdsh that are now fixed). Many of the patches are minor rebases from v2, with the biggest changes being fallout from: - patch 2: rename nbdkit_add_default_export to nbdkit_use_default_export - overall: this missed 1.22, so update