Lines Matching refs:record_size
42 static unsigned long record_size = 4096;
43 module_param(record_size, ulong, 0400);
44 MODULE_PARM_DESC(record_size,
97 u32 start_page = start_page_offset / record_size;
98 u32 erase_pages = mtd->erasesize / record_size;
165 mod = (cxt->nextpage * record_size) % mtd->erasesize;
167 cxt->nextpage = cxt->nextpage + ((mtd->erasesize - mod) / record_size);
173 ret = mtd->block_isbad(mtd, cxt->nextpage * record_size);
182 cxt->nextpage * record_size);
184 cxt->nextpage = cxt->nextpage + (mtd->erasesize / record_size);
187 if (i == cxt->oops_pages / (mtd->erasesize / record_size)) {
194 ret = mtdoops_erase_block(cxt, cxt->nextpage * record_size);
203 ret = mtd->block_markbad(mtd, cxt->nextpage * record_size);
225 ret = mtd->panic_write(mtd, cxt->nextpage * record_size,
226 record_size, &retlen, cxt->oops_buf);
228 ret = mtd->write(mtd, cxt->nextpage * record_size,
229 record_size, &retlen, cxt->oops_buf);
231 if (retlen != record_size || ret < 0)
233 cxt->nextpage * record_size, retlen, record_size, ret);
235 memset(cxt->oops_buf, 0xff, record_size);
258 ret = mtd->read(mtd, page * record_size, MTDOOPS_HEADER_SIZE,
263 page * record_size, retlen,
315 l2_cpy = min(l2, record_size - MTDOOPS_HEADER_SIZE);
316 l1_cpy = min(l1, record_size - MTDOOPS_HEADER_SIZE - l2_cpy);
340 u64 mtdoops_pages = div_u64(mtd->size, record_size);
354 if (mtd->erasesize < record_size) {
383 cxt->oops_pages = (int)mtd->size / record_size;
418 if ((record_size & 4095) != 0) {
419 printk(KERN_ERR "mtdoops: record_size must be a multiple of 4096\n");
422 if (record_size < 4096) {
423 printk(KERN_ERR "mtdoops: record_size must be over 4096 bytes\n");
433 cxt->oops_buf = vmalloc(record_size);
438 memset(cxt->oops_buf, 0xff, record_size);