Lines Matching refs:usize
17 pub type BlockId = usize;
22 pub const LBA_SIZE: usize = 512;
35 fn read_at(&self, offset: usize, len: usize, buf: &mut [u8]) -> Result<usize, SystemError>; in read_at() argument
42 fn write_at(&self, offset: usize, len: usize, buf: &[u8]) -> Result<usize, SystemError>; in write_at() argument
63 count: usize, in read_at() argument
65 ) -> Result<usize, SystemError>; in read_at() argument
77 count: usize, in write_at() argument
79 ) -> Result<usize, SystemError>; in write_at() argument
100 fn block_size(&self) -> usize; in block_size() argument
109 fn read_at(&self, offset: usize, len: usize, buf: &mut [u8]) -> Result<usize, SystemError> { in read_at() argument
122 let count: usize = (range.lba_end - range.lba_start).try_into().unwrap(); in read_at()
145 fn write_at(&self, offset: usize, len: usize, buf: &[u8]) -> Result<usize, SystemError> { in write_at() argument
158 let count: usize = (range.lba_end - range.lba_start).try_into().unwrap(); in write_at()
190 pub begin: usize, // 迭代器的起始位置 -> 块设备的地址 (单位是字节)
191 pub end: usize,
200 pub lba_start: usize, // 起始块的lba_id
201 pub lba_end: usize, // 终止块的lba_id
202 pub begin: usize, // 起始位置在块内的偏移量, 如果BlockIter启用Multiblock,则是多个块的偏移量
203 pub end: usize, // 结束位置在块内的偏移量,单位是字节
209 pub fn new(start_addr: usize, end_addr: usize, blk_size_log2: u8) -> BlockIter { in new() argument
217 pub fn new_multiblock(start_addr: usize, end_addr: usize, blk_size_log2: u8) -> BlockIter { in new_multiblock() argument
301 pub fn len(&self) -> usize { in len() argument
314 pub fn origin_begin(&self) -> usize { in origin_begin() argument
318 pub fn origin_end(&self) -> usize { in origin_end() argument
325 pub fn __bytes_to_lba(addr: usize, blk_size: usize) -> BlockId { in __bytes_to_lba() argument
331 pub fn __lba_to_bytes(lba_id: usize, blk_size: usize) -> BlockId { in __lba_to_bytes() argument