开发者

Flushing the page cache associated with an inode

开发者 https://www.devze.com 2022-12-13 11:31 出处:网络
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 work

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_pa开发者_运维问答ges() - for flushing dirty pages

Is there something I am missing in addition to this.

Thank you.

-- Bala


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

0

精彩评论

暂无评论...
验证码 换一张
取 消