Lines Matching refs:sb
267 struct stat sb; in produce_block_map() local
268 if (stat(path, &sb) != 0) { in produce_block_map()
273 LOG(INFO) << " block size: " << sb.st_blksize << " bytes"; in produce_block_map()
275 int blocks = ((sb.st_size-1) / sb.st_blksize) + 1; in produce_block_map()
276 LOG(INFO) << " file size: " << sb.st_size << " bytes, " << blocks << " blocks"; in produce_block_map()
281 blk_dev, static_cast<int64_t>(sb.st_size), in produce_block_map()
282 static_cast<int64_t>(sb.st_blksize)); in produce_block_map()
290 buffers.resize(WINDOW_SIZE, std::vector<unsigned char>(sb.st_blksize)); in produce_block_map()
312 while (pos < sb.st_size) { in produce_block_map()
314 int progress = static_cast<int>(100 * (double(pos) / double(sb.st_size))); in produce_block_map()
338 if (write_at_offset(buffers[head].data(), sb.st_blksize, wfd, in produce_block_map()
339 static_cast<off64_t>(sb.st_blksize) * block) != 0) { in produce_block_map()
350 std::min(static_cast<off64_t>(sb.st_blksize), sb.st_size - pos)); in produce_block_map()
360 pos += sb.st_blksize; in produce_block_map()
383 if (write_at_offset(buffers[head].data(), sb.st_blksize, wfd, in produce_block_map()
384 static_cast<off64_t>(sb.st_blksize) * block) != 0) { in produce_block_map()