Lines Matching refs:record_size

26 static unsigned long record_size = 4096;  variable
27 module_param(record_size, ulong, 0400);
28 MODULE_PARM_DESC(record_size,
85 u32 start_page = start_page_offset / record_size; in mtdoops_erase_block()
86 u32 erase_pages = mtd->erasesize / record_size; in mtdoops_erase_block()
139 mod = (cxt->nextpage * record_size) % mtd->erasesize; in mtdoops_workfunc_erase()
141 cxt->nextpage = cxt->nextpage + ((mtd->erasesize - mod) / record_size); in mtdoops_workfunc_erase()
146 while ((ret = mtd_block_isbad(mtd, cxt->nextpage * record_size)) > 0) { in mtdoops_workfunc_erase()
149 cxt->nextpage * record_size); in mtdoops_workfunc_erase()
151 cxt->nextpage = cxt->nextpage + (mtd->erasesize / record_size); in mtdoops_workfunc_erase()
154 if (i == cxt->oops_pages / (mtd->erasesize / record_size)) { in mtdoops_workfunc_erase()
166 ret = mtdoops_erase_block(cxt, cxt->nextpage * record_size); in mtdoops_workfunc_erase()
175 ret = mtd_block_markbad(mtd, cxt->nextpage * record_size); in mtdoops_workfunc_erase()
201 ret = mtd_panic_write(mtd, cxt->nextpage * record_size, in mtdoops_write()
202 record_size, &retlen, cxt->oops_buf); in mtdoops_write()
208 ret = mtd_write(mtd, cxt->nextpage * record_size, in mtdoops_write()
209 record_size, &retlen, cxt->oops_buf); in mtdoops_write()
211 if (retlen != record_size || ret < 0) in mtdoops_write()
213 cxt->nextpage * record_size, retlen, record_size, ret); in mtdoops_write()
215 memset(cxt->oops_buf, 0xff, record_size); in mtdoops_write()
239 if (mtd_block_isbad(mtd, page * record_size)) in find_next_position()
243 ret = mtd_read(mtd, page * record_size, sizeof(hdr), in find_next_position()
248 page * record_size, retlen, sizeof(hdr), ret); in find_next_position()
302 record_size - sizeof(struct mtdoops_hdr), NULL); in mtdoops_do_dump()
317 u64 mtdoops_pages = div_u64(mtd->size, record_size); in mtdoops_notify_add()
331 if (mtd->erasesize < record_size) { in mtdoops_notify_add()
363 cxt->oops_pages = (int)mtd->size / record_size; in mtdoops_notify_add()
399 if ((record_size & 4095) != 0) { in mtdoops_init()
403 if (record_size < 4096) { in mtdoops_init()
414 cxt->oops_buf = vmalloc(record_size); in mtdoops_init()
417 memset(cxt->oops_buf, 0xff, record_size); in mtdoops_init()