From: Sage Weil Date: Sun, 16 Feb 2014 01:22:30 +0000 (-0800) Subject: osd: set client incarnation for Objecter instance X-Git-Tag: v0.78~166^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=774125c7a87b34a3bc80b033a4ddbdc5630ca42d;p=ceph.git osd: set client incarnation for Objecter instance Each ceph-osd process's Objecter instance has a sequence of tid's that start at 1. To ensure these are unique across all time, set the client incarnation to the OSDMap epoch in which we booted. Note that the MDS does something similar (except the incarnation is actually the restart count for the MDS rank, since the MDSMap tracks that explicitly). Backport: emperor Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index da1a75b468e..88f3919ac1e 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -5290,6 +5290,10 @@ void OSD::handle_osd_map(MOSDMap *m) if (is_booting()) { dout(1) << "state: booting -> active" << dendl; state = STATE_ACTIVE; + + // set incarnation so that osd_reqid_t's we generate for our + // objecter requests are unique across restarts. + service.objecter->set_client_incarnation(osdmap->get_epoch()); } }