This is causing the bonnie++ tool to fail on Yaffs. I've traced it
down to an issue when combining the yaffs_iterate callback with
unlink. yaffs_iterate can be called with a start offset, and all the
files up to that point are skipped. However Bonnie++ uses readdir
+unlink, so it iterates over all items in the directory, unlinking
them. It does this in chunks, and each time it moves onto a new chunk,
it uses the offset at the end of the last chunk. But under the hood
YAFFS has been told to delete files from the directory, and as such
the offsets are now incorrect.
I think that inside yaffs_remove_obj_callback we should be checking if
the removed object has already been emitted by an in-progress search,
in which case we need to decrement the search position.
Any thoughts on this?
This message was posted to the following mailing lists: