Skip to contentSkip to conversation

question on bmap

DISCUSSION David Chow 1 participant 1 message Jan 22, 2003 VFS

lore
Share & tools
lore

David Chow

author
#0 lore raw

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