My understanding is that the Android will be using the yaffs2 file
system.  Is that correct?

If so, I have a question about how it handles failed stream
operations.  I'm writing a small app that can potentially do a lot of
I/O using file streams.  On some environments, I've noticed that under
high CPU situations, the occasional stream operation fails:  for
example, a call to mystream.write(buffer, 10) might fail, or a call to
"mystream << buffer".

I know it fails because mystream.fail() returns true after the call.
However, what I don't know is the extent of the failure.  Did none of
the bytes make it through?  Or two bytes, or nine?

The errno is 0 and so far in my testing, none of the bytes make it
through.  However, I don't know if this is always the case thanks to
yaffs journaling, or whether this is just luck and partial output of
the stream is just rare but possible with my application.

Does anyone know if I can/should rely on the journaling to ensure that
none of the bytes in the failed call makes it through, or if I need to
put in some sort of rollback mechanism in my code to gaurantee this?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to