Not at present. This would require forcing garbage collection to
happen until all blocks with the file of interest get erased. In
YAFFS2, this could be implemented by noting the current block sequence
number (or better yet, the highest block sequence number of the file of
interest), then garbage collecting all older blocks. As YAFFS1
doesn't use the block sequence numbers, it'd require a different
approach, possibly just garbage collecting all blocks with stale
data. Note that you can't just erase all blocks currently
containing pieces of the file, as other blocks may contain stale pages
that represent data that the file used to contain, but that got
replaced by newer pages.
Two notes: (1) the "erase everything old" operations could take
considerable time. (2) You'd need some way to invoke the
operation, either by hooking it into existing operations (say, set file
size to zero, then flush), by creating a new IOCTL, or perhaps finding
an IOCTL presently unused by YAFFS that could logically be taken
over for this purpose.
This doesn't seem like rocket science, but it certainly isn't in place at present.
Good luck,
William
Is there a proper way to force immediate deletion if the data is sensitive and we do not want the data is around on NAND?
Ceco
goog long < cecolong@yahoo.com> wrote:When a file is deleted, it is not immediately erased on flash, but is marked as deleted and the actual erasure etc is defered to future garbage collection operations. If the file contains sensitive information and we do not want to defer the erasure, do we have an option to do it? What is the easiest way to do?
Thanks,
Ceco