Secure Digital Flash Problems with ext3
Hello,
I a building a product where I use a SD media on an external USB SD reader formatted with the ext3 file system with full journaling enabled under CentOS 4.3. Everything works okay but occasionally (usually anywhere from 6000 loops to 40000 loops) I get a very long stall when either setting the fstream file pointer using the seekp method or doing a write. In this situation the code enters the seekp or write call and does not return until 34 to 35 seconds. It seems like it is timing out internally somehow.
I have tried changing the /sys/block/sda/device/timeout value from its default of 30 to 1 but this does not seem to change anything. Note that fstream.bad() is not set when the call returns. Is there anything else I can do to lessen the amount of time the call stalls in seekp or write? Does anybody know why this could or would happen? I have tried this with multiple readers and lots of different media always with the same results.
Additional info: The device is mounted synchronously, data journaling is enabled and commit time is set to 1 second.
Any help or suggestions would be greatly appreciated
Last edited by Denes; 08-22-2006 at 12:06 PM.
|