views:

65

answers:

1

Hi,

I modified the block mapping in an inode and want to flush the page cache associated with the inode so that the new inode with new mapping will be loaded from disk. I tried below functions but it works some time and fails some other time.

invalidate_mapping_pages() - for flushing non-dirty pages truncate_inode_pages() - for flushing dirty pages

Is there something I am missing in addition to this.

Thank you.

-- Bala

A: 

I found that filemap_datawrite_wait function can be used to write a dirty page to disk and read the updated page into memory.

-- Bala

Algorist