Home | History | Annotate | Download | only in misc

Lines Matching refs:block_size

89 "Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnf]\n"
326 static int do_read (int dev, unsigned char * buffer, int try, int block_size,
334 set_o_direct(dev, buffer, try * block_size, current_block);
340 if (ext2fs_llseek (dev, (ext2_loff_t) current_block * block_size,
341 SEEK_SET) != (ext2_loff_t) current_block * block_size)
347 got = read (dev, buffer, try * block_size);
354 got /= block_size;
398 static int do_write(int dev, unsigned char * buffer, int try, int block_size,
403 set_o_direct(dev, buffer, try * block_size, current_block);
409 if (ext2fs_llseek (dev, (ext2_loff_t) current_block * block_size,
410 SEEK_SET) != (ext2_loff_t) current_block * block_size)
414 got = write (dev, buffer, try * block_size);
419 got /= block_size;
435 int block_size, blk_t first_block,
458 blkbuf = allocate_buffer((blocks_at_once + 1) * block_size);
460 blkbuf = allocate_buffer(blocks_at_once * block_size);
474 pattern_fill(blkbuf + blocks_at_once * block_size,
475 t_patts[0], block_size);
506 got = do_read (dev, blkbuf, try, block_size, currently_testing);
512 if (memcmp (blkbuf+i*block_size,
513 blkbuf+blocks_at_once*block_size,
514 block_size))
550 int block_size, blk_t first_block,
562 buffer = allocate_buffer(2 * blocks_at_once * block_size);
563 read_buffer = buffer + blocks_at_once * block_size;
588 blocks_at_once * block_size);
604 got = do_write(dev, buffer, try, block_size,
649 got = do_read (dev, read_buffer, try, block_size,
656 if (memcmp(read_buffer + i * block_size,
657 buffer + i * block_size,
658 block_size))
691 int block_size, blk_t first_block,
721 blkbuf = allocate_buffer(3 * blocks_at_once * block_size);
729 test_base = blkbuf + (blocks_at_once * block_size);
730 read_base = blkbuf + (2 * blocks_at_once * block_size);
754 block_size, test_record[i].block);
755 save_ptr += test_record[i].num * block_size;
773 blocks_at_once * block_size);
804 got = do_read (dev, save_ptr, try, block_size,
821 written = do_write (dev, test_ptr, got, block_size,
830 save_ptr += got * block_size;
831 test_ptr += got * block_size;
875 block_size, currently_testing);
880 if (memcmp (test_ptr+i*block_size,
881 read_ptr+i*block_size, block_size))
890 block_size, currently_testing);
891 save_ptr += got * block_size;
894 test_ptr += got * block_size;
895 read_ptr += got * block_size;
985 int block_size = 1024;
1027 block_size = parse_uint(optarg, "block size");
1123 block_size,
1233 bb_count = test_func(dev, last_block, block_size,