搜索

C.5. Glock Holder

download PDF
表 C.5 “Glock holder 标签” 演示了不同 glock holder 标签的含义。
表 C.5. Glock holder 标签
标签名称含义
aAsync不等待 glock 结果(稍后会得到结果)
AAny接受所有兼容锁模式
c没有缓存取消锁定时立即降级 DLM 锁定
e没有过期日期忽略随后的取消锁定请求
E准确必须有 exact 锁定模式
F第一设定赋予这个锁定的第一个拥有者
H拥有者表示赋予请求的锁定
p优先权在队列头入队的拥有者
tTryA "try" lock
TTry 1CBA "try" lock that sends a callback
WWait等待请求完成的设置
最重要的拥有者标签之前提到的是 H(拥有者)和 W(等待),因为是将它们分别设定在已分配锁定请求和已排队锁定请求中。该列表中拥有者的顺序分厂重要。如果有任何已分配拥有者,他们总是位于队列的前端,后面跟着的是已排队拥有者。
如果没有任何已分配拥有者,那么该列表中的第一个拥有者将触发下一个状态更改。因为降级请求总是比该文件系统中的请求有更高的优先权,但那并不一定会有状态请求更改。
The glock subsystem supports two kinds of "try" lock. These are useful both because they allow the taking of locks out of the normal order (with suitable back-off and retry) and because they can be used to help avoid resources in use by other nodes. The normal t (try) lock is basically just what its name indicates; it is a "try" lock that does not do anything special. The T (try 1CB) lock, on the other hand, is identical to the t lock except that the DLM will send a single callback to current incompatible lock holders. One use of the T (try 1CB) lock is with the iopen locks, which are used to arbitrate among the nodes when an inode's i_nlink count is zero, and determine which of the nodes will be responsible for deallocating the inode. The iopen glock is normally held in the shared state, but when the i_nlink count becomes zero and ->delete_inode() is called, it will request an exclusive lock with T (try 1CB) set. It will continue to deallocate the inode if the lock is granted. If the lock is not granted it will result in the node(s) which were preventing the grant of the lock marking their glock(s) with the D (demote) flag, which is checked at ->drop_inode() time in order to ensure that the deallocation is not forgotten.
This means that inodes that have zero link count but are still open will be deallocated by the node on which the final close() occurs. Also, at the same time as the inode's link count is decremented to zero the inode is marked as being in the special state of having zero link count but still in use in the resource group bitmap. This functions like the ext3 file system3's orphan list in that it allows any subsequent reader of the bitmap to know that there is potentially space that might be reclaimed, and to attempt to reclaim it.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.