LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-22-2006, 10:39 AM   #1
Denes
Member
 
Registered: Mar 2004
Distribution: CentOS 4.3/4.5
Posts: 72

Rep: Reputation: 15
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.
 
Old 08-22-2006, 11:41 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 08-28-2006, 12:29 PM   #3
Denes
Member
 
Registered: Mar 2004
Distribution: CentOS 4.3/4.5
Posts: 72

Original Poster
Rep: Reputation: 15
After doing more research I have found the problems were due to media. It turns out that when using SD media if you want high quality with no errors you really must go high grade.

With the high quality media I don't get those long timeouts anymore. Since the software is the same and the reader is the same, I assume it has to be some type of I/O timeout. It would be great if I could reduce the length of those timeouts but I can live with it for now with the high quality media.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: EDGE Tech Corp Announces Portable Flash Drive With Muscle - the New 8GB DiskGO!(TM) Now Available; Swap and Go With This Secure Thumb-Sized Flash Drive LXer Syndicated Linux News 0 12-14-2005 02:16 AM
Built in secure digital multi media reader jasone Linux - Hardware 20 11-30-2005 03:53 PM
Rio forge mp3 player (UMS device) & Secure digital card mlaverdiere Linux - Hardware 5 06-24-2005 09:29 AM
Secure digital card permissions mrsolo Linux - Software 1 11-17-2004 04:48 PM
Secure Digital (SD) Memory Driver Problems? stevef1 Linux - General 2 12-15-2001 04:43 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration