Project

General

Profile

Actions

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.

Status:
Fix Under Review
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Tags:
Reviewed:
Affected Versions:
Component(FS):
Client
Labels (FS):
Pull request ID:

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();
Actions #1

Updated by Xiubo Li almost 4 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Xiubo Li over 3 years ago

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.

Actions #3

Updated by Xiubo Li about 3 years ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 39797
Actions

Also available in: Atom PDF