Skip to content
Snippets Groups Projects
Commit 35c1f53f authored by Nikita Danilov's avatar Nikita Danilov
Browse files

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
parent 890dfb37
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment