lkml.org 
[lkml]   [2002]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Heuristic readahead for filesystems
Date
Am Mittwoch, 11. September 2002 20:43 schrieb Xuan Baldauf:

> > Please correct me, if I am wrong, but wouldn't read() block ?
>
> AFAIK, "man open" tells
>
> [...]
> int open(const char *pathname, int flags);
> [...]
> O_NONBLOCK or O_NDELAY
> The file is opened in non-blocking mode. Neither the open
> nor any __subsequent__ operations on the file descriptor
> which is returned will cause the calling process to wait.
> [...]
>
> So read won't block if the file has been opened with O_NONBLOCK.

Well, so the man page tells you. The kernel sources tell otherwise, unless
I am badly mistaken.

> > Aio should be able to do it. But even that want help you with the stat
> > data.
>
> Aio would help me announcing stat() usage for the future?

No, it won't. But it would solve the issue of reading ahead.
Stating needs a kernel implementation of 'stat ahead'
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.113 / U:1.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site