UBI: Question about error checking in ubi_eba_write_leb()
steve
steve at baconbits.demon.co.uk
Tue Sep 30 04:00:49 PDT 2014
This is my first post to this mailing list, I think this is the right place for
my question.
I think the error checking in ubi_eba_write_leb() may be wrong and may cause
incorrect behaviour when extra checking is enabled in debugfs, here's the
scenario I have a problem with:
ubi_eba_write_leb() calls ubi_io_write_data() -> ubi_io_write() ->
ubi_dbg_check_all_ff()
ubi_dbg_check_all_ff() will perform an mtd_read() which can fail with EBADMSG
(if there is a failure to correct using ECC as in my case). This error code
will bubble back up to ubi_eba_write_leb(), but recover_peb() will only be
called if the error code was EIO. The question is should recover_peb() be
called in this case as well?
Thanks for any help with this,
Steve
More information about the linux-mtd
mailing list