Lines Matching refs:blk_size
118 let blk_size = 1usize << self.blk_size_log2; in next_block() localVariable
119 let lba_id = self.begin / blk_size; in next_block()
120 let begin = self.begin % blk_size; in next_block()
121 let end = if lba_id == self.end / blk_size { in next_block()
122 self.end % blk_size in next_block()
124 blk_size in next_block()
141 let blk_size = 1usize << self.blk_size_log2; in next_multiblock() localVariable
142 let lba_start = self.begin / blk_size; in next_multiblock()
143 let lba_end = self.end / blk_size; in next_multiblock()
146 if __bytes_to_lba(self.begin, blk_size) in next_multiblock()
147 != __bytes_to_lba(self.begin + blk_size - 1, blk_size) in next_multiblock()
153 let begin = self.begin % blk_size; // 因为是多个整块,这里必然是0 in next_multiblock()
154 let end = __lba_to_bytes(lba_end, blk_size) - self.begin; in next_multiblock()
214 pub fn __bytes_to_lba(addr: usize, blk_size: usize) -> BlockId { in __bytes_to_lba()
215 return addr / blk_size; in __bytes_to_lba()
220 pub fn __lba_to_bytes(lba_id: usize, blk_size: usize) -> BlockId { in __lba_to_bytes()
221 return lba_id * blk_size; in __lba_to_bytes()