Lines Matching defs:erase
186 struct erase_info erase;
190 dev_dbg(&mtd->dev, "try to erase off 0x%llx\n", off);
191 erase.len = cxt->mtd->erasesize;
192 erase.addr = off;
193 ret = mtd_erase(cxt->mtd, &erase);
197 dev_err(&mtd->dev, "erase of region [0x%llx, 0x%llx] on \"%s\" failed\n",
198 (unsigned long long)erase.addr,
199 (unsigned long long)erase.len, cxt->info.device);
206 * Avoiding over erasing, do erase block only when the whole block is unused.
207 * If the block contains valid log, do erase lazily on flush_removed() when
219 /* If the block still has valid data, mtdpstore do erase lazily */
225 /* all zones are unused, erase it */
231 * As there is no erase for panic case, we should ensure at least one zone
254 /* If there is no any empty zone, we have no way but to do erase */
430 cxt->dev.zone.erase = mtdpstore_erase;
451 struct erase_info erase;
462 /* 2nd. erase block */
463 erase.len = mtd->erasesize;
464 erase.addr = off;
465 ret = mtd_erase(mtd, &erase);
494 * it's nice to erase the block. However if the block still contains valid log,
495 * what mtdpstore can do is to erase and write the valid log back.