]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: fix bug filelock stuck at LOCK_XSYN leading client can't read data 25174/head
authorIvanGuan <yunfei.guan@xtaotech.com>
Thu, 29 Nov 2018 08:41:14 +0000 (16:41 +0800)
committerIvanGuan <yunfei.guan@xtaotech.com>
Thu, 29 Nov 2018 08:41:14 +0000 (16:41 +0800)
commitc3339d93f04030197d075e8a9c7235dba08530cf
tree6b6f07b9c3c626ba2583d68e43f51d8e3024595f
parent38e95b2d8a40df264ea685ad528f89c78e01da0c
mds: fix bug filelock stuck at LOCK_XSYN leading client can't read data

The file's wanted_loner_cap will be -1 when more than one client open
it.Sometimes the loner can't be dropped successfully which will leading
filelock stuck at LOCK_XSYN.However,this state doesn't allow others any
caps so the client open the file by O_RDONLY can't read data all the time
untill someone else open it by O_RDWR or O_WRONLY.We should change the
state to LOCK_MIX or LOCK_SYNC instead of stucking all the time.

Fixes: http://tracker.ceph.com/issues/37333
Signed-off-by: Guan yunfei <yunfei.guan@xtaotech.com>
src/mds/Locker.cc