Are erase suspends possible?

Derek Ross dross at iders.ca
Wed Apr 3 10:35:14 EST 2002


> dross said:
> > "do_erase_oneblock_dont_wait", which doesn't wait for the erase to
> > finish, and returns immediately,
> dwmw2 replied:
> You should not be looking in there. You should be calling the mtd->read(),
> mtd->write() and mtd->erase() functions. The latter is already permitted to 
> return immediately, calling a caller-provided callback later on completion.

Is that callback capability available in userspace?
I'm looking in the file "util/erase.c" and it calls
an ioctl with an erase_info_t, which is a typedef of
erase_info_user, which doesn't have that callback
function pointer.

> The read function already suspends active erases to fulfil the read 
> request. You can easily make the write function do the same, on chips that 
> support it.

If I modified cfi_intelext_write_* to suspend erases in progress,
would that screw up the operation of the JFFS2? Or would I have
to supply a flag to turn that feature on and off depending
on if JFFS is running?

Thanks,
Derek Ross.





More information about the linux-mtd mailing list