Adapt our "Utils.get_disk_allocated" function to the changed signature of
"NBD.block_status", coming from libnbd patch
ocaml: map C's uint32_t to OCaml's int64
Bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=2027598
Signed-off-by: Laszlo Ersek <lersek(a)redhat.com>
---
lib/utils.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/utils.ml b/lib/utils.ml
index f599b0e32450..4c8998c28a3c 100644
--- a/lib/utils.ml
+++ b/lib/utils.ml
@@ -195,10 +195,10 @@ let get_disk_allocated ~dir ~disknr =
(fun ctx offset entries err ->
assert (ctx = alloc_ctx);
for i = 0 to Array.length entries / 2 - 1 do
- let len = Int64.of_int32 entries.(i * 2)
+ let len = entries.(i * 2)
and typ = entries.(i * 2 + 1) in
assert (len > 0_L);
- if Int32.logand typ 1_l = 0_l then
+ if typ &^ 1_L = 0_L then
allocated := !allocated +^ len;
fetch_offset := !fetch_offset +^ len
done;
--
2.19.1.3.g30247aa5d201