Lines Matching refs:len

446             check_gpt_rw_params(gpt_buffer, part_name, offset, out.len())  in read_gpt_partition()
469 check_gpt_rw_params(gpt_buffer, part_name, offset, data.len()) in write_gpt_partition()
525 if scratch.len() < required_scratch_size(io, max_entries)? { in with_partitioned_scratch()
556 debug_assert!(is_aligned(buffer.len().into(), block_size)?); in check_range()
559 let blk_count = SafeNum::from(buffer.len()) / block_size; in check_range()
589 let aligned_read: usize = SafeNum::from(out.len()).round_down(block_size).try_into()?; in read_aligned_offset_and_buffer()
602 unaligned.clone_from_slice(&block_scratch[..unaligned.len()]); in read_aligned_offset_and_buffer()
626 min(offset.round_up(blk_io.block_size()).try_into()?, (offset + out.len()).try_into()?); in read_aligned_buffer()
629 if aligned_relative_offset < out.len() { in read_aligned_buffer()
642 (SafeNum::from(out.len()) - aligned_relative_offset).try_into()?; in read_aligned_buffer()
656 [offset_relative.try_into()?..(offset_relative + unaligned.len()).try_into()?], in read_aligned_buffer()
720 min((out_addr_value.round_up(blk_io.alignment()) - out_addr_value).try_into()?, out.len()); in read()
727 if unaligned_read == out.len() { in read()
761 SafeNum::from(data.len()).round_down(blk_io.block_size()).try_into()?; in write_aligned_offset_and_buffer()
766 if unaligned.len() == 0 { in write_aligned_offset_and_buffer()
774 block_scratch[..unaligned.len()].clone_from_slice(unaligned); in write_aligned_offset_and_buffer()
807 min(offset.round_up(blk_io.block_size()).try_into()?, (offset + data.len()).try_into()?); in write_aligned_buffer()
809 if aligned_relative_offset < data.len() { in write_aligned_buffer()
820 (SafeNum::from(data.len()) - aligned_relative_offset).try_into()?; in write_aligned_buffer()
875 data.len(), in write_bytes_mut()
880 if unaligned_write == data.len() { in write_bytes_mut()
1304 TestBlockDeviceBuilder::new().set_size(storage_size).build().scratch.len() - 1; in test_scratch_too_small()