The V1_LWT.BLOCK interface requires certain buffer preconditions are satisfied, including the buffers must be whole numbers of sectors in length. It's easy to forget to do this, with unpredictable results; sometimes it will work on one backend but then fail on another.
The Make_safe_BLOCK functor wraps read and write to check the preconditions and generate useful log and error messages.
The V1_LWT.BLOCK interface requires certain buffer preconditions are satisfied, including the buffers must be whole numbers of sectors in length. It's easy to forget to do this, with unpredictable results; sometimes it will work on one backend but then fail on another.
The
Make_safe_BLOCK
functor wrapsread
andwrite
to check the preconditions and generate useful log and error messages.Fixes [mirage/mirage#448]