Lines Matching refs:try

367 static int do_read (int dev, unsigned char * buffer, int try, int block_size,  in do_read()  argument
376 printf("do_read: block %d, try %d\n", current_block, try); in do_read()
378 set_o_direct(dev, buffer, try * block_size, in do_read()
392 got = read (dev, buffer, try * block_size); in do_read()
400 if (d_flag && got == try) { in do_read()
443 static int do_write(int dev, unsigned char * buffer, int try, int block_size, in do_write() argument
449 printf("do_write: block %lu, try %d\n", current_block, try); in do_write()
451 set_o_direct(dev, buffer, try * block_size, in do_write()
463 got = write (dev, buffer, try * block_size); in do_write()
493 int try; in test_ro() local
534 try = blocks_at_once; in test_ro()
556 else if (currently_testing + try > next_bad) in test_ro()
557 try = next_bad - currently_testing; in test_ro()
559 if (currently_testing + try > last_block) in test_ro()
560 try = last_block - currently_testing; in test_ro()
561 got = do_read (dev, blkbuf, try, block_size, currently_testing); in test_ro()
572 if (got == 0 && try == 1) in test_ro()
575 if (got != try) { in test_ro()
576 try = 1; in test_ro()
582 try = blocks_at_once; in test_ro()
608 int i, try, got, nr_pattern, pat_idx; in test_rw() local
648 try = blocks_at_once; in test_rw()
656 if (currently_testing + try > last_block) in test_rw()
657 try = last_block - currently_testing; in test_rw()
658 got = do_write(dev, buffer, try, block_size, in test_rw()
663 if (got == 0 && try == 1) in test_rw()
666 if (got != try) { in test_rw()
667 try = 1; in test_rw()
673 try = blocks_at_once; in test_rw()
690 try = blocks_at_once; in test_rw()
698 if (currently_testing + try > last_block) in test_rw()
699 try = last_block - currently_testing; in test_rw()
700 got = do_read (dev, read_buffer, try, block_size, in test_rw()
702 if (got == 0 && try == 1) in test_rw()
705 if (got != try) { in test_rw()
706 try = 1; in test_rw()
712 try = blocks_at_once; in test_rw()
747 int try, i; in test_nd() local
845 got = try = granularity - buf_used; in test_nd()
853 else if (currently_testing + try > next_bad) in test_nd()
854 try = next_bad - currently_testing; in test_nd()
856 if (currently_testing + try > last_block) in test_nd()
857 try = last_block - currently_testing; in test_nd()
858 got = do_read (dev, save_ptr, try, block_size, in test_nd()
894 if (got != try) { in test_nd()
895 try = 1; in test_nd()
934 try = 0; in test_nd()
937 if (try == 0) { in test_nd()
941 try = test_record[used2].num; in test_nd()
945 got = do_read (dev, read_ptr, try, in test_nd()
954 if (got < try) { in test_nd()
967 try -= got; in test_nd()