Whamcloud - gitweb
lu_ref support for ldlm_lock and ldlm_resource. See lu_ref patch.
authornikita <nikita>
Sat, 18 Oct 2008 17:04:25 +0000 (17:04 +0000)
committernikita <nikita>
Sat, 18 Oct 2008 17:04:25 +0000 (17:04 +0000)
commit35c1f53f2403b16415cb445927c02d141eac8555
tree5aaedc1a6e3ed2d58817466526d06a0a350a5de8
parent890dfb373259aeefbf0251041c8728024e52075a
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
12 files changed:
lustre/ChangeLog
lustre/include/lustre_dlm.h
lustre/ldlm/ldlm_extent.c
lustre/ldlm/ldlm_flock.c
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_lockd.c
lustre/ldlm/ldlm_request.c
lustre/ldlm/ldlm_resource.c
lustre/mdc/mdc_reint.c
lustre/mdt/mdt_handler.c
lustre/obdfilter/filter.c
lustre/osc/osc_request.c