Lines Matching +full:1 +full:eb
45 unsigned int eb; in rand_eb() local
48 /* Read or write up 2 eraseblocks at a time - hence 'ebcnt - 1' */ in rand_eb()
49 eb = get_random_u32_below(ebcnt - 1); in rand_eb()
50 if (bbt[eb]) in rand_eb()
52 return eb; in rand_eb()
67 int eb = rand_eb(); in do_read() local
72 if (bbt[eb + 1]) { in do_read()
78 addr = (loff_t)eb * mtd->erasesize + offs; in do_read()
84 int eb = rand_eb(), offs, err, len; in do_write() local
87 offs = offsets[eb]; in do_write()
89 err = mtdtest_erase_eraseblock(mtd, eb); in do_write()
92 offs = offsets[eb] = 0; in do_write()
95 len = ((len + pgsize - 1) / pgsize) * pgsize; in do_write()
97 if (bbt[eb + 1]) in do_write()
100 err = mtdtest_erase_eraseblock(mtd, eb + 1); in do_write()
103 offsets[eb + 1] = 0; in do_write()
106 addr = (loff_t)eb * mtd->erasesize + offs; in do_write()
112 offsets[eb++] = mtd->erasesize; in do_write()
115 offsets[eb] = offs; in do_write()
151 if (mtd->writesize == 1) { in mtd_stresstest_init()