fn sector_read<D: BlockDevice>(
dev: &D,
offset: u64,
buf: &mut [u8],
) -> Result<usize, BlockError>Expand description
Read buf.len() bytes from the block device starting at byte offset.
Handles unaligned starts and ends by reading the affected sectors into a 512-byte stack buffer and copying only the requested range.