From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bryan Henderson Subject: Re: Access content of file via inodes Date: Wed, 6 Apr 2005 10:57:43 -0700 Message-ID: References: <4253410C.20405@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Cc: "Kathy KN (HK)" , linux-fsdevel@vger.kernel.org Return-path: Received: from e5.ny.us.ibm.com ([32.97.182.145]:28317 "EHLO e5.ny.us.ibm.com") by vger.kernel.org with ESMTP id S262268AbVDFR5p (ORCPT ); Wed, 6 Apr 2005 13:57:45 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e5.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j36Hvjjv006912 for ; Wed, 6 Apr 2005 13:57:45 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j36Hvj1b084786 for ; Wed, 6 Apr 2005 13:57:45 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j36Hvi7F013163 for ; Wed, 6 Apr 2005 13:57:44 -0400 In-Reply-To: <4253410C.20405@suse.com> To: Jeff Mahoney Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org >What I meant by >> via blocks is to gain knowledge of the physical blocks used by the inodes >> and retrieve the content from it directly, by accessing b_data. > >The problem with that approach is that some filesystems may store part >of the file outside of a complete block. There's an even more basic problem with this approach: The question is specifically about the filesystem-type-independent layer above the VFS interface. At this layer, you don't even know that there is a block device involved. And if you do, you don't know that the filesystem driver uses the buffer cache to access it. And if you do know that it uses the buffer cache, you don't know that the file data you're looking for is presently in the buffer cache, or how to get it there if it isn't. If you believe in the layering at all, the only interface you can consider at this layer for getting at file data is VFS ->read. -- Bryan Henderson San Jose California IBM Almaden Research Center Filesystems