Lines Matching refs:blksize
54 uint32_t blksize; in ParseBlockMapFile() local
55 if (sscanf(lines[1].c_str(), "%" SCNu64 "%" SCNu32, &file_size, &blksize) != 2) { in ParseBlockMapFile()
60 if (file_size == 0 || blksize == 0) { in ParseBlockMapFile()
61 LOG(ERROR) << "Invalid size in block map file: size " << file_size << ", blksize " << blksize; in ParseBlockMapFile()
71 uint64_t blocks = ((file_size - 1) / blksize) + 1; in ParseBlockMapFile()
74 LOG(ERROR) << "Invalid data in block map file: size " << file_size << ", blksize " << blksize in ParseBlockMapFile()
102 return BlockMapData(block_dev, file_size, blksize, std::move(ranges)); in ParseBlockMapFile()
138 uint32_t blksize = block_map_data.block_size(); in MapBlockFile() local
139 uint64_t blocks = ((block_map_data.file_size() - 1) / blksize) + 1; in MapBlockFile()
140 void* reserve = mmap(nullptr, blocks * blksize, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0); in MapBlockFile()
149 munmap(reserve, blocks * blksize); in MapBlockFile()
156 size_t remaining_size = blocks * blksize; in MapBlockFile()
158 size_t range_size = (end - start) * blksize; in MapBlockFile()
160 static_cast<off_t>(start) * blksize); in MapBlockFile()
163 munmap(reserve, blocks * blksize); in MapBlockFile()
173 munmap(reserve, blocks * blksize); in MapBlockFile()