Displaying 3 results from an estimated 3 matches for "can_cache_wrapp".
Did you mean:
can_cache_wrapper
2019 May 17
1
Re: [nbdkit PATCH v2 08/24] ocaml: Implement .cache script callback
On Wed, May 15, 2019 at 10:57:58PM -0500, Eric Blake wrote:
> +static int
> +can_cache_wrapper (void *h)
> +{
> + CAMLparam0 ();
> + CAMLlocal1 (rv);
> +
> + caml_leave_blocking_section ();
> +
> + rv = caml_callback_exn (can_cache_fn, *(value *) h);
> + if (Is_exception_result (rv)) {
> + nbdkit_error ("%s", caml_format_exception (Extract_excep...
2019 May 16
0
[nbdkit PATCH v2 08/24] ocaml: Implement .cache script callback
...he_fn;
+
/*----------------------------------------------------------------------*/
/* Wrapper functions that translate calls from C (ie. nbdkit) to OCaml. */
@@ -638,6 +641,48 @@ extents_wrapper (void *h, uint32_t count, uint64_t offset, uint32_t flags,
CAMLreturnT (int, 0);
}
+static int
+can_cache_wrapper (void *h)
+{
+ CAMLparam0 ();
+ CAMLlocal1 (rv);
+
+ caml_leave_blocking_section ();
+
+ rv = caml_callback_exn (can_cache_fn, *(value *) h);
+ if (Is_exception_result (rv)) {
+ nbdkit_error ("%s", caml_format_exception (Extract_exception (rv)));
+ caml_enter_blocking_section...
2019 May 16
27
[nbdkit PATCH v2 00/24] implement NBD_CMD_CACHE
Since v1:
- rework .can_cache to be tri-state, with default of no advertisement
(ripple effect through other patches)
- add a lot more patches in order to round out filter support
And in the meantime, Rich pushed NBD_CMD_CACHE support into libnbd, so
in theory we now have a way to test cache commands through the entire
stack.
Eric Blake (24):
server: Internal hooks for implementing