]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: properly eval locks after importing inode 19646/head
authorYan, Zheng <zyan@redhat.com>
Sat, 9 Dec 2017 06:09:24 +0000 (14:09 +0800)
committerPrashant D <pdhange@redhat.com>
Fri, 22 Dec 2017 02:56:33 +0000 (21:56 -0500)
commit1643d5a4f8f726ce27ac9f5cc8160c34c07c09bb
treeab028be5ee506c976696a99ffba5187b260cbbcc
parent88b4534a0fab6f7020874ff8903b2f2eb9d06eb2
mds: properly eval locks after importing inode

We should call Locker:eval() for all imported inodes who have non-zero
'wanted caps'. MDS does not properly handle following case.

- client open a inode for read, it send a cap message to MDS.a (the cap
  message updates 'wanted caps')
- MDS.a receive the cap message, the inode is non-auth and is ambiguous
  auth. MDS.a can not request 'wanted caps' from auth mds.
- MDS.a finishes importing the inode from. But no caps are imported and
  mds_caps_wanted map is empty.

The bug can cause read hang.

Fixes: http://tracker.ceph.com/issues/22357
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit debb556076c5685f0d8bb8029a95684b9e552eb8)
src/mds/Migrator.cc