summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2013-07-29 17:05:44 +0200
committerGreg Farnum <greg@inktank.com>2013-08-23 22:54:43 +0200
commit476e4902907dfadb3709ba820453299ececf990b (patch)
tree0283bdc34b750e9e74e04f7649601396ffec25fd /share
parentdoc: Fixed broken link by adding Transitioning to ceph-deploy to this doc. (diff)
downloadceph-476e4902907dfadb3709ba820453299ececf990b.tar.xz
ceph-476e4902907dfadb3709ba820453299ececf990b.zip
mds: remove waiting lock before merging with neighbours
CephFS currently deadlocks under CTDB's ping_pong POSIX locking test when run concurrently on multiple nodes. The deadlock is caused by failed removal of a waiting_locks entry when the waiting lock is merged with an existing lock, e.g: Initial MDS state (two clients, same file): held_locks -- start: 0, length: 1, client: 4116, pid: 7899, type: 2 start: 2, length: 1, client: 4110, pid: 40767, type: 2 waiting_locks -- start: 1, length: 1, client: 4116, pid: 7899, type: 2 Waiting lock entry 4116@1:1 fires: handle_client_file_setlock: start: 1, length: 1, client: 4116, pid: 7899, type: 2 MDS state after lock is obtained: held_locks -- start: 0, length: 2, client: 4116, pid: 7899, type: 2 start: 2, length: 1, client: 4110, pid: 40767, type: 2 waiting_locks -- start: 1, length: 1, client: 4116, pid: 7899, type: 2 Note that the waiting 4116@1:1 lock entry is merged with the existing 4116@0:1 held lock to become a 4116@0:2 held lock. However, the now handled 4116@1:1 waiting_locks entry remains. When handling a lock request, the MDS calls adjust_locks() to merge the new lock with available neighbours. If the new lock is merged, then the waiting_locks entry is not located in the subsequent remove_waiting() call because adjust_locks changed the new lock to include the old locks. This fix ensures that the waiting_locks entry is removed prior to modification during merge. Signed-off-by: David Disseldorp <ddiss@suse.de> Reviewed-by: Greg Farnum <greg@inktank.com>
Diffstat (limited to 'share')
0 files changed, 0 insertions, 0 deletions