This commit is contained in:
Hannes Mehnert 2024-11-04 17:33:50 +01:00
parent 1e35bfefbd
commit a47193f147

View file

@ -126,7 +126,7 @@ module Make
Store.pp_error e Mirage_kv.Key.pp step); Store.pp_error e Mirage_kv.Key.pp step);
go () go ()
| Ok steps -> | Ok steps ->
explore := !explore @ List.map fst steps; explore := List.map fst steps @ !explore;
go () go ()
in in
go () go ()
@ -286,6 +286,12 @@ module Make
common_bindings common_bindings
let set_from_handle dev dest h = let set_from_handle dev dest h =
(* TODO: we need a function in tar which
(a) takes a path
(b) takes a function that reads (from the swap) and writes (to the tar)
(c) once the function is finished, it writes the tar header
-> this would allow us to avoid the rename stuff below
*)
let size = Optint.Int63.of_int64 (Swap.size h) in let size = Optint.Int63.of_int64 (Swap.size h) in
KV.allocate dev dest size >>= fun r -> KV.allocate dev dest size >>= fun r ->
let rec loop offset = let rec loop offset =