From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kathy KN (HK)" Subject: Re: Access content of file via inodes Date: Wed, 6 Apr 2005 09:32:32 +0800 Message-ID: References: <4252E09B.9020606@suse.com> Reply-To: "Kathy KN (HK)" Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from zproxy.gmail.com ([64.233.162.203]:54952 "EHLO zproxy.gmail.com") by vger.kernel.org with ESMTP id S262069AbVDFBcf (ORCPT ); Tue, 5 Apr 2005 21:32:35 -0400 Received: by zproxy.gmail.com with SMTP id 18so6876nzp for ; Tue, 05 Apr 2005 18:32:32 -0700 (PDT) To: Jeff Mahoney In-Reply-To: <4252E09B.9020606@suse.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org > Hi Kathy - > > If performance is more important or you really do only have access to an > inode, you can read from the page cache directly using inode->i_mapping > and read_cache_page. This has the advantage that you don't need to copy > the data to access it, but the disadvantage that it is more complex and > can be tricky to get right. Hi Jeff, I felt that the second suggestion seems to be more of an elegant solution, though I need to find out how to actually do it correctly. Thanks for the tip. If you have example code, that would be splendid. Kathy