linux/fs/ocfs2/dlm
Sunil Mushran 7b791d6856 ocfs2/dlm: Fix race during lockres mastery
dlm_get_lock_resource() is supposed to return a lock resource with a proper
master. If multiple concurrent threads attempt to lookup the lockres for the
same lockid while the lock mastery in underway, one or more threads are likely
to return a lockres without a proper master.

This patch makes the threads wait in dlm_get_lock_resource() while the mastery
is underway, ensuring all threads return the lockres with a proper master.

This issue is known to be limited to users using the flock() syscall. For all
other fs operations, the ocfs2 dlmglue layer serializes the dlm op for each
lockid.

Users encountering this bug will see flock() return EINVAL and dmesg have the
following error:
ERROR: Dlm error "DLM_BADARGS" while calling dlmlock on resource <LOCKID>: bad api args

Reported-by: Coly Li <coyli@suse.de>
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2009-01-05 08:40:35 -08:00
..
dlmapi.h ocfs2: Negotiate locking protocol versions. 2008-02-06 16:11:29 -08:00
dlmast.c ocfs2/dlm: Clean up errors in dlm_proxy_ast_handler() 2009-01-05 08:40:35 -08:00
dlmcommon.h ocfs2/dlm: Fix race in adding/removing lockres' to/from the tracking list 2009-01-05 08:40:35 -08:00
dlmconvert.c ocfs2: Use dlm_print_one_lock_resource for lock resource print 2008-03-10 15:13:50 -07:00
dlmconvert.h [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:47 -08:00
dlmdebug.c ocfs2/dlm: Fix race in adding/removing lockres' to/from the tracking list 2009-01-05 08:40:35 -08:00
dlmdebug.h [PATCH 2/3] ocfs2/dlm: Silence build warnings 2008-05-30 15:15:10 -07:00
dlmdomain.c ocfs2/dlm: Fix race in adding/removing lockres' to/from the tracking list 2009-01-05 08:40:35 -08:00
dlmdomain.h [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:47 -08:00
dlmfs.c Merge branch 'master' into next 2008-12-04 17:16:36 +11:00
dlmfsver.c ocfs2: bump version number 2008-01-25 15:05:46 -08:00
dlmfsver.h [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:47 -08:00
dlmlock.c ocfs2/dlm: Create slabcaches for lock and lockres 2008-04-18 08:56:08 -07:00
dlmmaster.c ocfs2/dlm: Fix race during lockres mastery 2009-01-05 08:40:35 -08:00
dlmrecovery.c ocfs2/dlm: Print message showing the recovery master 2008-03-10 15:14:14 -07:00
dlmthread.c ocfs2/dlm: Hold off sending lockres drop ref message while lockres is migrating 2009-01-05 08:40:35 -08:00
dlmunlock.c ocfs2: Added post handler callable function in o2net message handler 2007-02-07 12:06:56 -08:00
dlmver.c ocfs2: bump version number 2008-01-25 15:05:46 -08:00
dlmver.h [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:47 -08:00
Makefile ocfs2: Only build ocfs2/dlm with the o2cb stack module 2008-04-18 08:56:12 -07:00
userdlm.c ocfs2: Negotiate locking protocol versions. 2008-02-06 16:11:29 -08:00
userdlm.h ocfs2: comments typo fix 2008-12-01 14:46:31 -08:00