Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of cephfs linux kernel client for ceph_inode_info related work queue processing function

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces cephfs linux kernel client for ceph_inode_info-related work queue processing function example analysis, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

Struct ceph_inode_info {

.

Struct work_struct iTunwbworks; / / writeback work

Struct work_struct iTunes pgstarted inventing work; / / page invaliate work

Struct work_struct i_vmtruncate_work

.

}

Struct ceph_inode_info- > i_wb_work work queue handler

Ceph_writeback_work (struct work_struct * work)

| | _ _ get struct ceph_inode_info structure from work |

| | _ _ get struct inode structure from struct ceph_inode_info structure |

| | _ _ call the filemap_fdatawrite (& inode- > i_data) function to write back the dirty data in the struct address_space specified by inode- > i_data to the ceph cluster |

| | _ _ call _ _ filemap_fdatawrite () function |

| | _ _ call _ _ filemap_fdatawrite_range () function |

| | _ _ create struct writeback_control structure and initialize it |

| | _ _ call wbc_attach_fdatawrite_inode () function to add struct writeback_control structure to struct inode |

| | _ _ call the do_writepages () function to write back the dirty data in struct address_space to the ceph cluster |

| | _ _ call ceph_writepages_start () function for data write-back operation |

Struct ceph_inode_info- > i_pg_inv_work work queue handler

Ceph_invalidate_work (struct work_struct * work)

| | _ _ get struct ceph_inode_info structure from work |

| | _ _ get struct inode structure from struct ceph_inode_info structure |

| | _ _ get struct ceph_fs_client structure from struct inode structure |

| | _ _ call the invalidate_inode_page2 () function to clear all pages in the struct address_space specified by inode- > i_mapping |

Struct ceph_inode_info- > i_vmtruncate_work work queue handler

Ceph_vmtruncate_work (struct work_strcut * work)

| | _ _ get struct ceph_inode_info structure from work |

| | _ _ get struct inode structure from struct ceph_inode_info structure |

| | _ _ call all the pages corresponding to the struct address_space in the truncate struct inode structure of the _ _ ceph_do_pending_vmtruncate () function |

| | _ _ call the truncate_pagecache () function to unmap and delete the pagecache that has already been truncated |

| | _ _ call wake_up_all (& ci- > i_cap_wq) function to wake up the waiting process on struct ceph_inode_info- > i_cap_wq |

Thank you for reading this article carefully. I hope the article "sample Analysis of cephfs linux kernel client for ceph_inode_info-related work queue processing functions" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report