]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: reset session->osdmap if session is not waiting for a map anymore
authorKefu Chai <kchai@redhat.com>
Thu, 12 May 2016 12:28:11 +0000 (20:28 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 17 May 2016 05:23:43 +0000 (13:23 +0800)
commit82b0af7cedc3071cd83ee53479f834c23c62b7d0
tree5d8a49d6a553e0d9fe8fc93d7cc938ba23ba6da1
parent046c38198a70904fad0c9a5af6d03299f25877a3
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>
src/osd/OSD.cc
src/osd/OSD.h