Lines Matching refs:block_size
89 "Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnf]\n"
323 static int do_read (int dev, unsigned char * buffer, int try, int block_size,
331 set_o_direct(dev, buffer, try * block_size, current_block);
337 if (ext2fs_llseek (dev, (ext2_loff_t) current_block * block_size,
338 SEEK_SET) != (ext2_loff_t) current_block * block_size)
344 got = read (dev, buffer, try * block_size);
351 got /= block_size;
395 static int do_write(int dev, unsigned char * buffer, int try, int block_size,
400 set_o_direct(dev, buffer, try * block_size, current_block);
406 if (ext2fs_llseek (dev, (ext2_loff_t) current_block * block_size,
407 SEEK_SET) != (ext2_loff_t) current_block * block_size)
411 got = write (dev, buffer, try * block_size);
416 got /= block_size;
432 int block_size, blk_t first_block,
455 blkbuf = allocate_buffer((blocks_at_once + 1) * block_size);
457 blkbuf = allocate_buffer(blocks_at_once * block_size);
471 pattern_fill(blkbuf + blocks_at_once * block_size,
472 t_patts[0], block_size);
503 got = do_read (dev, blkbuf, try, block_size, currently_testing);
509 if (memcmp (blkbuf+i*block_size,
510 blkbuf+blocks_at_once*block_size,
511 block_size))
547 int block_size, blk_t first_block,
559 buffer = allocate_buffer(2 * blocks_at_once * block_size);
560 read_buffer = buffer + blocks_at_once * block_size;
585 blocks_at_once * block_size);
601 got = do_write(dev, buffer, try, block_size,
646 block_size,
653 if (memcmp(read_buffer + i * block_size,
654 buffer + i * block_size,
655 block_size))
688 int block_size, blk_t first_block,
718 blkbuf = allocate_buffer(3 * blocks_at_once * block_size);
726 test_base = blkbuf + (blocks_at_once * block_size);
727 read_base = blkbuf + (2 * blocks_at_once * block_size);
751 block_size, test_record[i].block);
752 save_ptr += test_record[i].num * block_size;
770 blocks_at_once * block_size);
801 got = do_read (dev, save_ptr, try, block_size,
818 written = do_write (dev, test_ptr, got, block_size,
827 save_ptr += got * block_size;
828 test_ptr += got * block_size;
872 block_size, currently_testing);
877 if (memcmp (test_ptr+i*block_size,
878 read_ptr+i*block_size, block_size))
887 block_size, currently_testing);
888 save_ptr += got * block_size;
891 test_ptr += got * block_size;
892 read_ptr += got * block_size;
982 int block_size = 1024;
1024 block_size = parse_uint(optarg, "block size");
1120 block_size,
1230 bb_count = test_func(dev, last_block, block_size,