struct ceph_inode_info {node
......app
struct work_struct i_wb_work; //writeback work函數
struct work_struct i_pg_inv_work; //page invaliate workspa
struct work_struct i_vmtruncate_work;隊列
......進程
};ci
struct ceph_inode_info->i_wb_work工做隊列處理函數it
ceph_writeback_work(struct work_struct *work)集羣
|__從work獲得struct ceph_inode_info結構cli
|__從struct ceph_inode_info結構獲得struct inode結構
|__調用filemap_fdatawrite(&inode->i_data)函數將inode->i_data指定的struct address_space中的dirty數據回寫到ceph集羣中
|__調用__filemap_fdatawrite()函數
|__調用__filemap_fdatawrite_range()函數
|__建立struct writeback_control結構且初始化
|__調用wbc_attach_fdatawrite_inode()函數將struct writeback_control結構添加到struct inode中
|__調用do_writepages()函數將struct address_space中的dirty數據回寫到ceph集羣
|__調用ceph_writepages_start()函數進行數據回寫操做
struct ceph_inode_info->i_pg_inv_work工做隊列處理函數
ceph_invalidate_work(struct work_struct *work)
|__從work獲得struct ceph_inode_info結構
|__從struct ceph_inode_info結構獲得struct inode結構
|__從struct inode結構獲得struct ceph_fs_client結構
|__調用invalidate_inode_page2()函數清除掉inode->i_mapping指定的struct address_space中的全部pages
struct ceph_inode_info->i_vmtruncate_work工做隊列處理函數
ceph_vmtruncate_work(struct work_strcut *work)
|__從work獲得struct ceph_inode_info結構
|__從struct ceph_inode_info結構獲得struct inode結構
|__調用__ceph_do_pending_vmtruncate()函數truncate struct inode結構中的struct address_space對應的全部pages
|__調用truncate_pagecache()函數解除映射而且刪除已經truncated的pagecache
|__調用wake_up_all(&ci->i_cap_wq)函數喚醒struct ceph_inode_info->i_cap_wq上的等待進程