From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve French Subject: O_DIRECT Date: Wed, 01 Dec 2004 19:01:05 -0600 Message-ID: <41AE6951.8050408@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from e31.co.us.ibm.com ([32.97.110.129]:62147 "EHLO e31.co.us.ibm.com") by vger.kernel.org with ESMTP id S261509AbULBBBI (ORCPT ); Wed, 1 Dec 2004 20:01:08 -0500 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e31.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id iB2117jd372246 for ; Wed, 1 Dec 2004 20:01:07 -0500 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id iB2117wF400644 for ; Wed, 1 Dec 2004 18:01:07 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id iB2116nX022911 for ; Wed, 1 Dec 2004 18:01:06 -0700 Received: from [9.41.91.80] (dyn9419180.austin.ibm.com [9.41.91.80] (may be forged)) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id iB2116Mw022889 for ; Wed, 1 Dec 2004 18:01:06 -0700 To: linux-fsdevel@vger.kernel.org Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Is there a precise defintion of the Linux O_DIRECT semantics, in particularly addressing desired behavior in the cases of: 1) inodes opened more than once (some with and some without O_DIRECT) - do the other open file instances get disabled caching? 2) consistency of mmap data and sendfile data (how could this work without write through of the page cache?) when inode is opened O_DIRECT If the goal of O_DIRECT is not only to bypass the local client's page cache, but also to bypass the 4K read/write page size (and allow larger read, writes), is it acceptable for an fs to handle files opened O_DIRECT to disable caching by turning off calls to generic_file_read and generic_file_write for reads and writes to that inode (after a sync)? If not, is there a conventional "no cache" mount option used by other filesystems to do the equivalent on a mounted volume?