]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osdc/Objecter: handle race between calc_target and handle_osd_map 12055/head
authorSage Weil <sage@redhat.com>
Thu, 17 Nov 2016 20:05:26 +0000 (14:05 -0600)
committerSage Weil <sage@redhat.com>
Thu, 17 Nov 2016 20:05:26 +0000 (14:05 -0600)
commita863ae1c0fab636eabced0979889cbb3be74bf74
tree1caa72ffbcc227cd186531b1c83fb3f3bd518e07
parentfde141e2c912e41e8bed6c84ba37e528e5940caa
osdc/Objecter: handle race between calc_target and handle_osd_map

If we fail to get an existing session and have to take the exclusive lock,
we may race with an OSDMap update and end up with a stale target.  Check
for an epoch change and, if it happens, recalculate the mapping.

Fixes: http://tracker.ceph.com/issues/17942
Reported-by: wangdongxu <wangdongxu@cmss.chinamobile.com>
Reported-by: menglingkun <menglingkun@cmss.chinamobile.com>
Signed-off-by: Sage Weil <sage@redhat.com>
src/osdc/Objecter.cc