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

What is the use of dentry unlink in MDCache

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

Share

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

This article mainly introduces the use of dentry unlink in MDCache, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

The send_dentry_unlink () function in MDCache is responsible for sending dentry unlink to other MDS processes. The sender first gets all the replica_map under the parameter dn, and if the straydn in the parameter is not empty, it gets all the replica_map under the straydn. Then iterate through the resulting replica_map array to create a MDentryUnlink class message, and if the straydn is not empty, call the replicate_stray () function to write the straydn information to the straybl field in the MDentryUnlink class message. It is best to send MDentryUnlink class messages to the destination MDS process.

The handle_dentry_unlink () function in MDCache is responsible for handling MDentryUnlink class messages. If the straybl in the class message is not empty, call the add_replica_stray () function to get the straydn. After that, we get the corresponding CDir and its corresponding CDentry class object and CDentry::linkage class object in the class message. If CDentry::linkage is primary link, call dn- > dir- > unlink_inode () function to unlink primary link, if CDentry::linkage is not primary link, call dn- > dir- > unlink_inode () function to unlink remote link. If straydn is not empty, the trim_dentry () function is called to clean up the straydn.

Thank you for reading this article carefully. I hope the article "what is the use of dentry unlink in MDCache" 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: 299

*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