]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: reset session->osdmap if session is not waiting for a map anymore 9090/head
authorKefu Chai <kchai@redhat.com>
Thu, 12 May 2016 12:28:11 +0000 (20:28 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 15 Jul 2016 10:03:09 +0000 (18:03 +0800)
commitb31ac2d37ecb68ed9661923fbaeaedeac241ba4a
tree545cb5ed8b97440cb42bac7d95f60e62264dcce6
parentc2ea6dbd652782bb227b7787c486660871b2d950
osd: reset session->osdmap if session is not waiting for a map anymore

we should release the osdmap reference once we are done with it,
otherwise we might need to wait very long to update that reference with
a newer osdmap ref. this appears to be an OSDMap leak: it is held by an
quiet OSD::Session forever.

the osdmap is not reset in OSD::session_notify_pg_create(), because its
only caller is wake_pg_waiters(), which will call
dispatch_session_waiting() later. and dispatch_session_waiting() will
check the session->osdmap, and will also reset the osdmap if
session->waiting_for_pg.empty().

Fixes: http://tracker.ceph.com/issues/13990
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 82b0af7cedc3071cd83ee53479f834c23c62b7d0)
src/osd/OSD.cc
src/osd/OSD.h