[Ocfs2-devel] [PATCH 1/2] ocfs2 fix o2dlm dlm run purgelist

Sunil Mushran sunil.mushran at oracle.com
Thu Jun 17 16:34:23 PDT 2010


On 06/17/2010 12:28 PM, Joel Becker wrote:
>> No. There is no need for time ordering. Or, am I missing something?
>>
>> We delay the purge incase the file system changes its mind and wants
>> to reuse it. By delaying, we hold onto the mastery information. That's it.
>>      
> 	The comment is right there:
>
>                      /* Since resources are added to the purge list
>                       * in tail order, we can stop at the first
>                       * unpurgable resource -- anyone added after
>                       * him will have a greater last_used value */
>                      break;
>
> So we're going to break out of this loop as soon we see a later time.
> Anything you've moved to the back will be ignored until enough time
> passes that the things in front of it are candidates for purge.
> 	You could, of course, just change the 'break' to a 'continue'
> and find those, but I kind of like the short-circuit behavior.  I don't
> know how long this list is, but walking a whole bunch of "not yet"
> lockreses just to hopefully find one at the end seems silly.
> 	I think it is better to leave the busy ones at the front of the
> list and just walk past them if they can't be dealt with now.
>    

That check can remain. The fact that a lockres in the purgelist was
seen to be in use, means that another thread got to it before the
dlm_thread and that that thread is about to remove that lockres from
the purgelist shortly. As in, as soon as the two spinlocks are relinquished.




More information about the Ocfs2-devel mailing list