diff options
| author | Jinshan Xiong <[email protected]> | 2016-03-30 19:48:40 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2016-03-30 21:38:13 -0700 |
| commit | 06563b5606da7635b1fd5d121e7bd6d221e23db4 (patch) | |
| tree | 204b4a98c04f9301e1606f9bedc93fb1bdc04463 /scripts | |
| parent | e5c4e635c36354c0f4aa6a00b1787d15ee689528 (diff) | |
staging/lustre/clio: cl_lock simplification
In this patch, the cl_lock cache is eliminated. cl_lock is turned
into a cacheless data container for the requirements of locks to
complete the IO. cl_lock is created before I/O starts and destroyed
when the I/O is complete.
cl_lock depends on LDLM lock to fulfill lock semantics. LDLM lock
is attached to cl_lock at OSC layer. LDLM lock is still cacheable.
Two major methods are supported for cl_lock: clo_enqueue and
clo_cancel. A cl_lock is enqueued by cl_lock_request(), which will
call clo_enqueue() methods for each layer to enqueue the lock.
At the LOV layer, if a cl_lock consists of multiple sub cl_locks,
each sub locks will be enqueued correspondingly. At OSC layer, the
lock enqueue request will tend to reuse cached LDLM lock; otherwise
a new LDLM lock will have to be requested from OST side.
cl_lock_cancel() must be called to release a cl_lock after use.
clo_cancel() method will be called for each layer to release the
resource held by this lock. At OSC layer, the reference count of LDLM
lock, which is held at clo_enqueue time, is released.
LDLM lock can only be canceled if there is no cl_lock using it.
Signed-off-by: Bobi Jam <[email protected]>
Signed-off-by: Jinshan Xiong <[email protected]>
Reviewed-on: http://review.whamcloud.com/10858
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3259
Reviewed-by: John L. Hammond <[email protected]>
Signed-off-by: Oleg Drokin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions