ocfs2/dlm: make existing convertion precedent over new lock
PATCH 1/1 ocfs2/dlm: make existing convertion precedent over new lock
Make existing convertion precedent over new lock. It makes o2dlm locking more like fair locking.
--- fs/ocfs2/dlm/dlmlock.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
fs/ocfs2/dlm/dlmlock.c +3 -0
@@ -106,6 +106,9 @@ static int dlm_can_grant_new_lock(struct dlm_lock_resource *res,if (!dlm_lock_compatible (tmplock->ml.type, lock->ml.type))return 0 ; +if (!dlm_lock_compatible (tmplock->ml.convert_type, + lock->ml.type)) +return 0 ; }return 1 ;
Signature · 1 line
1.7.2.3
PATCH 1/1 ocfs2/dlm: make existing convertion precedent over new lock
Quoted 2 lines · Wengang Wang
Make existing convertion precedent over new lock. It makes o2dlm locking more like fair locking.
Is this a problem you were solving, or just something you
thought about while reading the code? If it was a problem you ran into, can you give the details?
Joel
Quoted 28 lines
Signed-off-by Wengang Wang <[email protected]>--- fs/ocfs2/dlm/dlmlock.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)fs/ocfs2/dlm/dlmlock.c +3
-0@@ -106,6 +106,9 @@ static int dlm_can_grant_new_lock(struct dlm_lock_resource *res,if (!dlm_lock_compatible (tmplock->ml.type, lock->ml.type))return 0 ; +if (!dlm_lock_compatible (tmplock->ml.convert_type, + lock->ml.type)) +return 0 ; }return 1 ;Signature · 7 lines
1.7.2.3 _______________________________________________ Ocfs2-devel mailing list Ocfs2-devel at oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-devel
Signature · 9 lines
Life's Little Instruction Book #207 "Swing for the fence." Joel Becker Senior Development Manager Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127
PATCH 1/1 ocfs2/dlm: make existing convertion precedent over new lock
Quoted 7 lines · Joel Becker
Quoted 2 lines · Wengang Wang
Make existing convertion precedent over new lock. It makes o2dlm locking more like fair locking.
Is this a problem you were solving, or just something you
thought about while reading the code? If it was a problem you ran into, can you give the details?
It looks like you're just emulating the logic from__dlmconvert_master(). That makes sense.
Joel
Signature · 9 lines
Life's Little Instruction Book #274 "Leave everything a little better than you found it." Joel Becker Senior Development Manager Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127
PATCH 1/1 ocfs2/dlm: make existing convertion precedent over new lock
Quoted 9 lines · Joel Becker
Quoted 6 lines · Joel Becker
Quoted 2 lines · Wengang Wang
Make existing convertion precedent over new lock. It makes o2dlm locking more like fair locking.
Is this a problem you were solving, or just something you
thought about while reading the code? If it was a problem you ran into, can you give the details?It looks like you're just emulating the logic from
__dlmconvert_master(). That makes sense.
This fix is an offshoot of the conversation in his thread.
http://oss.oracle.com/pipermail/ocfs2-devel/2010-November/007524.html
The fix looks ok. But I would rather that we confirm this problem and the fix before we push it upstream.
Wengang, Have you attempted to reproduce the problem and/or test the fix?
Sunil
PATCH 1/1 ocfs2/dlm: make existing convertion precedent over new lock
Hi Sunil/Joel,
Quoted 5 lines · Sunil Mushran
Quoted 4 lines · Joel Becker
Quoted 3 lines · Joel Becker
Quoted 2 lines · Wengang Wang
Make existing convertion precedent over new lock. It makes o2dlm locking more like fair locking.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Is this a problem you were solving, or just something you
thought about while reading the code? If it was a problem you ran into, can you give the details?It looks like you're just emulating the logic from
__dlmconvert_master(). That makes sense.This fix is an offshoot of the conversation in his thread.
http://oss.oracle.com/pipermail/ocfs2-devel/2010-November/007524.html
Yes. The patch tries to fix that problem.
Quoted 2 lines
The fix looks ok. But I would rather that we confirm this problem and the fix before we push it upstream.
Yes, understand.
Quoted 1 line
Wengang, Have you attempted to reproduce the problem and/or test the fix?
I didn't let ct to test the patch yet. I can't reproduce it in house. What I tested is very common test cases, such as parallel listing and parallel kernel compiling.
I will let ct test with the patch. But since it's not a frequently hit problem, not easy to say if the patch works....
What's the idea for such cases?
regards,
wengang.
PATCH 1/1 ocfs2/dlm: make existing convertion precedent over new lock
In reply to Wengang WangQuoted 4 lines · Wengang Wang
Make existing convertion precedent over new lock. It makes o2dlm locking more like fair locking.
Signed-off-by Wengang Wang <[email protected]>
This is now in the merge-window branch of ocfs2.git.
Joel
Quoted 26 lines
--- fs/ocfs2/dlm/dlmlock.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)fs/ocfs2/dlm/dlmlock.c +3
-0@@ -106,6 +106,9 @@ static int dlm_can_grant_new_lock(struct dlm_lock_resource *res,if (!dlm_lock_compatible (tmplock->ml.type, lock->ml.type))return 0 ; +if (!dlm_lock_compatible (tmplock->ml.convert_type, + lock->ml.type)) +return 0 ; }return 1 ;Signature · 7 lines
1.7.2.3 _______________________________________________ Ocfs2-devel mailing list Ocfs2-devel at oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-devel
Signature · 10 lines
You can use a screwdriver to screw in screws or to clean your ears, however, the latter needs real skill, determination and a lack of fear of injuring yourself. It is much the same with JavaScript. - Chris Heilmann Joel Becker Senior Development Manager Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127