From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Chow Subject: question on bmap Date: Wed, 22 Jan 2003 23:15:14 +0800 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <3E2EB582.5050005@shaolinmicro.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: To: linux-fsdevel@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hi all, I am writing a persistent disk cache for a network file system. Is it true to use bmap() plus some buffer head ops, is generally faster than readpage() and commit_write() paths? As I know the buffer head has a reference to the page, that means in terms of memory consumption, they are the same (please clarify)?? Not sure which is better.. it seems bmap is lower level, but I'm not sure is there any equivalent code like grab_cache_page() and read_cache_page() so that I can find so in-page_cache pages to save some I/O time. Please advice on usage and potential pitfalls. Thanks for any comments. regards, David Chow