Lines Matching refs:try

358 static int do_read (int dev, unsigned char * buffer, int try, int block_size,  in do_read()  argument
367 printf("do_read: block %d, try %d\n", current_block, try); in do_read()
369 set_o_direct(dev, buffer, try * block_size, in do_read()
383 got = read (dev, buffer, try * block_size); in do_read()
391 if (d_flag && got == try) { in do_read()
434 static int do_write(int dev, unsigned char * buffer, int try, int block_size, in do_write() argument
440 printf("do_write: block %lu, try %d\n", current_block, try); in do_write()
442 set_o_direct(dev, buffer, try * block_size, in do_write()
454 got = write (dev, buffer, try * block_size); in do_write()
484 int try; in test_ro() local
525 try = blocks_at_once; in test_ro()
547 else if (currently_testing + try > next_bad) in test_ro()
548 try = next_bad - currently_testing; in test_ro()
550 if (currently_testing + try > last_block) in test_ro()
551 try = last_block - currently_testing; in test_ro()
552 got = do_read (dev, blkbuf, try, block_size, currently_testing); in test_ro()
563 if (got == 0 && try == 1) in test_ro()
566 if (got != try) { in test_ro()
567 try = 1; in test_ro()
573 try = blocks_at_once; in test_ro()
599 int i, try, got, nr_pattern, pat_idx; in test_rw() local
639 try = blocks_at_once; in test_rw()
647 if (currently_testing + try > last_block) in test_rw()
648 try = last_block - currently_testing; in test_rw()
649 got = do_write(dev, buffer, try, block_size, in test_rw()
654 if (got == 0 && try == 1) in test_rw()
657 if (got != try) { in test_rw()
658 try = 1; in test_rw()
664 try = blocks_at_once; in test_rw()
681 try = blocks_at_once; in test_rw()
689 if (currently_testing + try > last_block) in test_rw()
690 try = last_block - currently_testing; in test_rw()
691 got = do_read (dev, read_buffer, try, block_size, in test_rw()
693 if (got == 0 && try == 1) in test_rw()
696 if (got != try) { in test_rw()
697 try = 1; in test_rw()
703 try = blocks_at_once; in test_rw()
738 int try, i; in test_nd() local
836 got = try = granularity - buf_used; in test_nd()
844 else if (currently_testing + try > next_bad) in test_nd()
845 try = next_bad - currently_testing; in test_nd()
847 if (currently_testing + try > last_block) in test_nd()
848 try = last_block - currently_testing; in test_nd()
849 got = do_read (dev, save_ptr, try, block_size, in test_nd()
885 if (got != try) { in test_nd()
886 try = 1; in test_nd()
925 try = 0; in test_nd()
928 if (try == 0) { in test_nd()
932 try = test_record[used2].num; in test_nd()
936 got = do_read (dev, read_ptr, try, in test_nd()
945 if (got < try) { in test_nd()
958 try -= got; in test_nd()