Tasks #46688
open
Tasks #23844: client: break client_lock
client: add inode lock support
Added by Xiubo Li almost 4 years ago.
Updated about 3 years ago.
Description
We can add one private lock for each inode, it will have better concurrency and could improve the perf.
The lock sequence should always be:
inode->inode_lock.lock();
...
client_lock.lock();
...
client_lock.unlock();
...
inode->inode_lock.unlock();
- Status changed from New to In Progress
For the Inode::inode_lock it is responsible to protect :
1, all the members in the Inode class
2, if the Inode's corresponding dentry's type is dir, it will also responsible for all the sub dentries under that dir.
3, if the code need to access or change the sub dentries' inode members, it must be sure that once the sub dentries' inode inode_lock is locked, don't to try to lock the parent_inode's inode_lock.
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 39797
Also available in: Atom
PDF