Main Page | Report this Page
Linux Forum Index  »  Linux - Slackware Forum  »  Accepting read errors?...
Page 1 of 1    

Accepting read errors?...

Author Message
root...
Posted: Wed Oct 21, 2009 1:30 am
Guest
I have an application in which I read video data from
a DVD-Ram disk. Sometimes I get a read error which
freezes the system for too long. I am willing to
accept a read error if I can keep the kernel from
locking up until it chooses to stop trying. Is
there an option on the OPEN() statement, or
an FCTL() or IOCTL() command that will allow me
to control the number of tries before returning
to me? Please suggest a man page or a section in
the Stevens book.


TIA
 
Sylvain Robitaille...
Posted: Fri Oct 23, 2009 10:55 am
Guest
On Wed, 21 Oct 2009 11:30:03 +0000 (UTC), root wrote:

Quote:
... Is there an option on the OPEN() statement, or an FCTL() or
IOCTL() command that will allow me to control the number of tries
before returning to me? Please suggest a man page or a section in the
Stevens book.

A non-blocking read, perhaps? (I don't know whether this would
accomplish what you're looking for, but it's what I would try first).

I don't have my copy of the Stevens book with me at the moment, but look
in the open(2) manual page for "NONBLOCK", and see if that helps ...

--
----------------------------------------------------------------------
Sylvain Robitaille syl at (no spam) encs.concordia.ca

Systems analyst / AITS Concordia University
Faculty of Engineering and Computer Science Montreal, Quebec, Canada
----------------------------------------------------------------------
 
Chris Sorenson...
Posted: Fri Oct 23, 2009 2:40 pm
Guest
root wrote:
Quote:
I have an application in which I read video data from
a DVD-Ram disk. Sometimes I get a read error which
freezes the system for too long. I am willing to
accept a read error if I can keep the kernel from
locking up until it chooses to stop trying. Is
there an option on the OPEN() statement, or
an FCTL() or IOCTL() command that will allow me
to control the number of tries before returning
to me? Please suggest a man page or a section in
the Stevens book.


I assume you meant fcntl()?

I further assume you've read `man open' and `man fcntl'?

Slackware doesn't have a man page for ioctl but you can read about it
here:

http://linux.about.com/library/cmd/blcmdl2_ioctl.htm
 
Lew Pitcher...
Posted: Fri Oct 23, 2009 2:52 pm
Guest
On October 23, 2009 16:40, in alt.os.linux.slackware, Chris Sorenson
(csoren at (no spam) isd.net) wrote:

Quote:
root wrote:
I have an application in which I read video data from
a DVD-Ram disk. Sometimes I get a read error which
freezes the system for too long. I am willing to
accept a read error if I can keep the kernel from
locking up until it chooses to stop trying. Is
there an option on the OPEN() statement, or
an FCTL() or IOCTL() command that will allow me
to control the number of tries before returning
to me? Please suggest a man page or a section in
the Stevens book.


I assume you meant fcntl()?

I further assume you've read `man open' and `man fcntl'?

Slackware doesn't have a man page for ioctl

Hmmmm... let's check that assertion, shall we?

~ $ cat /etc/slackware-version
Slackware 12.0.0

~ $ man ioctl | col | head -10
IOCTL(2) Linux Programmer's Manual IOCTL(2)



NAME
ioctl - control device

SYNOPSIS
#include <sys/ioctl.h>

~ $

Sorry, it looks like Slackware (at least up to 12.0) /does/ have a man page
for ioctl(2). Perhaps you are thinking of the various IOCTLS? If so, then
the ioctl_list(2) manpage (which is present in Slackware 12) will help.


Quote:

Hmmmm... substantially the same as ioctl(2) from the Slackware manpages.

--
Lew Pitcher

Master Codewright & JOAT-in-training | Registered Linux User #112576
http://pitcher.digitalfreehold.ca/ | GPG public key available by request
---------- Slackware - Because I know what I'm doing. ------
 
Sylvain Robitaille...
Posted: Fri Oct 23, 2009 3:35 pm
Guest
On Sat, 24 Oct 2009 09:52:15 +1100, Grant wrote:

Quote:
I don't have Stevens Wink Dunno what it is even...

It's an excellent reference on systems programming, often used as a
textbook in Computer Science undergraduate systems programming courses.
Whether you personally find it all that useful would depend on how much
you've learned from other sources, or more specifically (at least in my
usage of the Stevens book) how easily you can find that information from
other sources. I tend to refer to manpages first, then to Stevens when
I want to see specific code examples. Then again, I don't do a whole
lot of systems programming these days ...

--
----------------------------------------------------------------------
Sylvain Robitaille syl at (no spam) encs.concordia.ca

Systems analyst / AITS Concordia University
Faculty of Engineering and Computer Science Montreal, Quebec, Canada
----------------------------------------------------------------------
 
root...
Posted: Fri Oct 23, 2009 4:21 pm
Guest
Chris Sorenson <csoren at (no spam) isd.net> wrote:
Quote:

I assume you meant fcntl()?

Sure
Quote:

I further assume you've read `man open' and `man fcntl'?

Slackware doesn't have a man page for ioctl but you can read about it
here:

http://linux.about.com/library/cmd/blcmdl2_ioctl.htm

Thanks for responding. My slack 12.2 has an ioctl
man page, which I have read along with man open
and man fcntl, none of which discuss my problem.
 
root...
Posted: Fri Oct 23, 2009 4:25 pm
Guest
Sylvain Robitaille <syl at (no spam) alcor.concordia.ca> wrote:
Quote:
On Wed, 21 Oct 2009 11:30:03 +0000 (UTC), root wrote:

... Is there an option on the OPEN() statement, or an FCTL() or
IOCTL() command that will allow me to control the number of tries
before returning to me? Please suggest a man page or a section in the
Stevens book.

A non-blocking read, perhaps? (I don't know whether this would
accomplish what you're looking for, but it's what I would try first).

I don't have my copy of the Stevens book with me at the moment, but look
in the open(2) manual page for "NONBLOCK", and see if that helps ...


Thanks for responding. NONBLOCK means the call won't wait for
data ready, not what I need. When you ask for data from
a device the system will break its back to get the data, even
if you don't care that much.
 
root...
Posted: Fri Oct 23, 2009 4:27 pm
Guest
Grant <g_r_a_n_t_ at (no spam) bugsplatter.id.au> wrote:
Quote:

I don't have Stevens Wink Dunno what it is even...


A very expensive book filled with the most arcane
system information.
 
Grant...
Posted: Fri Oct 23, 2009 4:43 pm
Guest
On Fri, 23 Oct 2009 15:40:52 -0500, Chris Sorenson <csoren at (no spam) isd.net> wrote:

Quote:
root wrote:
I have an application in which I read video data from
a DVD-Ram disk. Sometimes I get a read error which
freezes the system for too long. I am willing to
accept a read error if I can keep the kernel from
locking up until it chooses to stop trying. Is
there an option on the OPEN() statement, or
an FCTL() or IOCTL() command that will allow me
to control the number of tries before returning
to me? Please suggest a man page or a section in
the Stevens book.


I assume you meant fcntl()?

I further assume you've read `man open' and `man fcntl'?

Slackware doesn't have a man page for ioctl but you can read about it
here:

http://linux.about.com/library/cmd/blcmdl2_ioctl.htm

Also see: http://www.kernel.org/doc/man-pages/index.html -- this is
a project to document linux and the kernel interface.

Grant.
--
http://bugsplatter.id.au
 
Grant...
Posted: Fri Oct 23, 2009 4:52 pm
Guest
On Fri, 23 Oct 2009 20:55:32 +0000 (UTC), Sylvain Robitaille <syl at (no spam) alcor.concordia.ca> wrote:

Quote:
On Wed, 21 Oct 2009 11:30:03 +0000 (UTC), root wrote:

... Is there an option on the OPEN() statement, or an FCTL() or
IOCTL() command that will allow me to control the number of tries
before returning to me? Please suggest a man page or a section in the
Stevens book.

A non-blocking read, perhaps? (I don't know whether this would
accomplish what you're looking for, but it's what I would try first).

I think that's more likely to return data not ready state, not ignore
errors -- read errors may cause retries in the device, not much the OS
can do about that. So perhaps there's a way to tell the device not to
retry errors?

Blocking read usually means to wait (block) until data appears, for
example blocking (thus yielding CPU time) until seek completion and
valid data ready.
Quote:

I don't have my copy of the Stevens book with me at the moment, but look
in the open(2) manual page for "NONBLOCK", and see if that helps ...

I don't have Stevens Wink Dunno what it is even...

Grant.
--
http://bugsplatter.id.au
 
Grant...
Posted: Fri Oct 23, 2009 10:49 pm
Guest
On Sat, 24 Oct 2009 01:35:11 +0000 (UTC), Sylvain Robitaille <syl at (no spam) alcor.concordia.ca> wrote:

Quote:
On Sat, 24 Oct 2009 09:52:15 +1100, Grant wrote:

I don't have Stevens Wink Dunno what it is even...

It's an excellent reference on systems programming, often used as a
textbook in Computer Science undergraduate systems programming courses.
Whether you personally find it all that useful would depend on how much
you've learned from other sources, or more specifically (at least in my
usage of the Stevens book) how easily you can find that information from
other sources. I tend to refer to manpages first, then to Stevens when
I want to see specific code examples. Then again, I don't do a whole
lot of systems programming these days ...

Well, who does? Closest I've been recently was a sockets interface
fora daemon last year -- and I had help with that from a forum poster
who put up some perl socket code that worked, unlike the mess I was
in trying to choose and use CPAN modules.

There'sa lot of info in the new linux manpages, and the author is working
on a book too: http://blog.man7.org/

Grant.
--
http://bugsplatter.id.au
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Thu Dec 03, 2009 4:50 pm