]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: fix cap revoke race 19975/head
authorYan, Zheng <zyan@redhat.com>
Thu, 11 Jan 2018 09:50:22 +0000 (17:50 +0800)
committerPrashant D <pdhange@redhat.com>
Wed, 17 Jan 2018 02:34:45 +0000 (21:34 -0500)
commit9e1efd6c45485030032b3e982c7d2eadc317a6d4
tree95ad859270a4967b95a9354579d160d0c4fafb83
parent360e9801b7089b750f56f19955e376dcf430dca3
client: fix cap revoke race

If caps are been revoking by the auth MDS, don't consider them as
issued even they are still issued by non-auth MDS. The non-auth
MDS should also be revoking/exporting these caps, the client just
hasn't received the cap revoke/export message.

The race I encountered is: When caps are exporting to new MDS, the
client receives cap import message and cap revoke message from the
new MDS, then receives cap export message from the old MDS. When
the client receives cap revoke message from the new MDS, the revoking
caps are still issued by the old MDS, so the client does nothing.
Later when the cap export message is received, the client removes
the caps issued by the old MDS. (Another way to fix the race is
calling ceph_check_caps() in handle_cap_export())

copid from kernel commit b1530f57

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 99d8c303ce689b7348a6ce923721cbd140775e1b)

Conflicts:
src/client/Inode.cc: Resolved for loop conflict in << operator
                             and caps_issued func
src/client/Inode.cc