ubifs_scan() error handling

twebb taliaferro62 at gmail.com
Wed Jun 23 13:04:23 EDT 2010


Without having a complete understanding of how the UBI and UBIFS
internals work, I have a question regarding error handling in
ubifs_scan().

When ubifs_scan() encounters SCANNED_EMPTY_SPACE during execution, it
checks whether the LEB is all 0xFFs and if not - returns -EUCLEAN.  In
some cases (for example, in orphan.c/kill_orphans()), any error
returned by ubifs_scan() results in a call to ubifs_recover_leb().
Would it make sense and be acceptable to make this call any time
ubifs_scan() returns an error?  And if so, would it make more sense to
include the ubifs_recover_leb() call in ubifs_scan() at goto
corruption?

Thanks,
twebb



More information about the linux-mtd mailing list