Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 11 Sep 2002 15:02:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 11 Sep 2002 15:02:13 -0400 Received: from mailout08.sul.t-online.com ([194.25.134.20]:64197 "EHLO mailout08.sul.t-online.com") by vger.kernel.org with ESMTP id convert rfc822-to-8bit; Wed, 11 Sep 2002 15:02:12 -0400 Content-Type: text/plain; charset=US-ASCII From: Oliver Neukum To: Xuan Baldauf Subject: Re: Heuristic readahead for filesystems Date: Wed, 11 Sep 2002 21:04:41 +0200 User-Agent: KMail/1.4.1 Cc: Rik van Riel , linux-kernel@vger.kernel.org References: <200209112030.27269.oliver@neukum.name> <3D7F8ECA.21086A5@baldauf.org> In-Reply-To: <3D7F8ECA.21086A5@baldauf.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Message-Id: <200209112104.41987.oliver@neukum.name> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1151 Lines: 32 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/