Displaying 3 results from an estimated 3 matches for "cacheemul".
2019 May 16
0
[nbdkit PATCH v2 08/24] ocaml: Implement .cache script callback
...EMOVE
}
diff --git a/plugins/ocaml/NBDKit.ml b/plugins/ocaml/NBDKit.ml
index 7aca8c8..02aa200 100644
--- a/plugins/ocaml/NBDKit.ml
+++ b/plugins/ocaml/NBDKit.ml
@@ -37,6 +37,8 @@ and flag = May_trim | FUA | Req_one
type fua_flag = FuaNone | FuaEmulate | FuaNative
+type cache_flag = CacheNone | CacheEmulate | CacheNop
+
type extent = {
offset : int64;
length : int64;
@@ -82,6 +84,9 @@ type 'a plugin = {
can_extents : ('a -> bool) option;
extents : ('a -> int32 -> int64 -> flags -> extent list) option;
+
+ can_cache : ('a -> cache_flag) option;
+ cac...
2019 Aug 15
2
[nbdkit PATCH] ocaml: Add support for dynamic .thread_model
...-- a/plugins/ocaml/NBDKit.ml
+++ b/plugins/ocaml/NBDKit.ml
@@ -1,3 +1,4 @@
+(* hey emacs, 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 ->...
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