Home | History | Annotate | Download | only in misc

Lines Matching defs:block_size

80 	fprintf(stderr, _("Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnf]\n [-c blocks_at_once] [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n device [last_block [start_block]]\n"),
265 static long do_read (int dev, unsigned char * buffer, int try, int block_size,
270 set_o_direct(dev, buffer, try * block_size, current_block);
276 if (ext2fs_llseek (dev, (ext2_loff_t) current_block * block_size,
277 SEEK_SET) != (ext2_loff_t) current_block * block_size)
281 got = read (dev, buffer, try * block_size);
286 got /= block_size;
294 static long do_write (int dev, unsigned char * buffer, int try, int block_size,
299 set_o_direct(dev, buffer, try * block_size, current_block);
305 if (ext2fs_llseek (dev, (ext2_loff_t) current_block * block_size,
306 SEEK_SET) != (ext2_loff_t) current_block * block_size)
310 got = write (dev, buffer, try * block_size);
315 got /= block_size;
331 int block_size, unsigned long from_count,
351 blkbuf = allocate_buffer((blocks_at_once + 1) * block_size);
353 blkbuf = allocate_buffer(blocks_at_once * block_size);
366 pattern_fill(blkbuf + blocks_at_once * block_size,
367 t_patts[0], block_size);
392 got = do_read (dev, blkbuf, try, block_size, currently_testing);
398 if (memcmp (blkbuf+i*block_size,
399 blkbuf+blocks_at_once*block_size,
400 block_size))
434 int block_size, unsigned long from_count,
443 buffer = allocate_buffer(2 * blocks_at_once * block_size);
444 read_buffer = buffer + blocks_at_once * block_size;
468 blocks_at_once * block_size);
478 got = do_write(dev, buffer, try, block_size,
517 got = do_read (dev, read_buffer, try, block_size,
524 if (memcmp(read_buffer + i * block_size,
525 buffer + i * block_size,
526 block_size))
559 int block_size, unsigned long from_count,
588 blkbuf = allocate_buffer(3 * blocks_at_once * block_size);
596 test_base = blkbuf + (blocks_at_once * block_size);
597 read_base = blkbuf + (2 * blocks_at_once * block_size);
619 block_size, test_record[i].block);
620 save_ptr += test_record[i].num * block_size;
638 blocks_at_once * block_size);
663 got = do_read (dev, save_ptr, try, block_size,
680 written = do_write (dev, test_ptr, got, block_size,
688 save_ptr += got * block_size;
689 test_ptr += got * block_size;
733 block_size, currently_testing);
738 if (memcmp (test_ptr+i*block_size,
739 read_ptr+i*block_size, block_size))
748 block_size, currently_testing);
749 save_ptr += got * block_size;
752 test_ptr += got * block_size;
753 read_ptr += got * block_size;
826 int block_size = 1024;
868 block_size = strtoul (optarg, &tmp, 0);
869 if (*tmp || block_size > 4096) {
977 block_size,
1100 bb_count = test_func(dev, last_block, block_size,