Lines Matching refs:record_size
42 static unsigned long record_size = 4096; variable
43 module_param(record_size, ulong, 0400);
44 MODULE_PARM_DESC(record_size,
97 u32 start_page = start_page_offset / record_size; in mtdoops_erase_block()
98 u32 erase_pages = mtd->erasesize / record_size; in mtdoops_erase_block()
165 mod = (cxt->nextpage * record_size) % mtd->erasesize; in mtdoops_workfunc_erase()
167 cxt->nextpage = cxt->nextpage + ((mtd->erasesize - mod) / record_size); in mtdoops_workfunc_erase()
172 while ((ret = mtd_block_isbad(mtd, cxt->nextpage * record_size)) > 0) { in mtdoops_workfunc_erase()
175 cxt->nextpage * record_size); in mtdoops_workfunc_erase()
177 cxt->nextpage = cxt->nextpage + (mtd->erasesize / record_size); in mtdoops_workfunc_erase()
180 if (i == cxt->oops_pages / (mtd->erasesize / record_size)) { in mtdoops_workfunc_erase()
192 ret = mtdoops_erase_block(cxt, cxt->nextpage * record_size); in mtdoops_workfunc_erase()
201 ret = mtd_block_markbad(mtd, cxt->nextpage * record_size); in mtdoops_workfunc_erase()
223 ret = mtd_panic_write(mtd, cxt->nextpage * record_size, in mtdoops_write()
224 record_size, &retlen, cxt->oops_buf); in mtdoops_write()
230 ret = mtd_write(mtd, cxt->nextpage * record_size, in mtdoops_write()
231 record_size, &retlen, cxt->oops_buf); in mtdoops_write()
233 if (retlen != record_size || ret < 0) in mtdoops_write()
235 cxt->nextpage * record_size, retlen, record_size, ret); in mtdoops_write()
237 memset(cxt->oops_buf, 0xff, record_size); in mtdoops_write()
258 if (mtd_block_isbad(mtd, page * record_size)) in find_next_position()
262 ret = mtd_read(mtd, page * record_size, MTDOOPS_HEADER_SIZE, in find_next_position()
267 page * record_size, retlen, in find_next_position()
314 record_size - MTDOOPS_HEADER_SIZE, NULL); in mtdoops_do_dump()
327 u64 mtdoops_pages = div_u64(mtd->size, record_size); in mtdoops_notify_add()
341 if (mtd->erasesize < record_size) { in mtdoops_notify_add()
371 cxt->oops_pages = (int)mtd->size / record_size; in mtdoops_notify_add()
407 if ((record_size & 4095) != 0) { in mtdoops_init()
411 if (record_size < 4096) { in mtdoops_init()
422 cxt->oops_buf = vmalloc(record_size); in mtdoops_init()
427 memset(cxt->oops_buf, 0xff, record_size); in mtdoops_init()