lu_ref support for ldlm_lock and ldlm_resource. See lu_ref patch.
lu_ref fields ->l_reference and ->lr_reference are added to ldlm_lock and ldlm_resource. LDLM interface has to be changed, because code that releases a reference on a lock, has to "know" what reference this is. In the most frequent case lock = ldlm_handle2lock(handle); ... LDLM_LOCK_PUT(lock); no changes are required. When any other reference (received _not_ from ldlm_handle2lock()) is released, LDLM_LOCK_RELEASE() has to be called instead of LDLM_LOCK_PUT(). Arguably, changes are pervasive, and interface requires some discipline for proper use. On the other hand, it was very instrumental in finding a few leaked lock references. b=16450
Showing
- lustre/ChangeLog 26 additions, 0 deletionslustre/ChangeLog
- lustre/include/lustre_dlm.h 49 additions, 3 deletionslustre/include/lustre_dlm.h
- lustre/ldlm/ldlm_extent.c 2 additions, 2 deletionslustre/ldlm/ldlm_extent.c
- lustre/ldlm/ldlm_flock.c 1 addition, 1 deletionlustre/ldlm/ldlm_flock.c
- lustre/ldlm/ldlm_lock.c 39 additions, 15 deletionslustre/ldlm/ldlm_lock.c
- lustre/ldlm/ldlm_lockd.c 13 additions, 10 deletionslustre/ldlm/ldlm_lockd.c
- lustre/ldlm/ldlm_request.c 47 additions, 13 deletionslustre/ldlm/ldlm_request.c
- lustre/ldlm/ldlm_resource.c 8 additions, 2 deletionslustre/ldlm/ldlm_resource.c
- lustre/mdc/mdc_reint.c 2 additions, 1 deletionlustre/mdc/mdc_reint.c
- lustre/mdt/mdt_handler.c 14 additions, 4 deletionslustre/mdt/mdt_handler.c
- lustre/obdfilter/filter.c 5 additions, 3 deletionslustre/obdfilter/filter.c
- lustre/osc/osc_request.c 2 additions, 0 deletionslustre/osc/osc_request.c
Loading
Please register or sign in to comment