pub fn write_and_verify<D: Device + ?Sized>(
dev: &mut D,
offset: u64,
buf: &[u8],
) -> Result<()>Expand description
Write buf at offset, then re-read and verify byte-equal. Returns
Error::VerifyMismatch on the first divergence.
This is the “verify-by-default” primitive. Callers that legitimately want
to skip verification (e.g. mid-pipeline writes that will be re-checked
holistically later) call write_at directly.