]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/: optionally track every pg ref
authorSamuel Just <sam.just@inktank.com>
Fri, 19 Apr 2013 00:54:39 +0000 (17:54 -0700)
committerSamuel Just <sam.just@inktank.com>
Fri, 19 Apr 2013 18:05:58 +0000 (11:05 -0700)
commit1493e7dbfb4accd931e27c563526510492a11a8b
treec92b7ad800f27b42d11b973b05ed28cc3a5fd9f8
parent66c007fb3b71156a72e8bcfd8295a3e8f812d1bb
osd/: optionally track every pg ref

This involves three pieces:

For intrusive_ptr type references, we use TrackedIntPtr instead.  This
uses get_with_id and put_with_id to associate an id and backtrace with
each particular ref instance.

For refs taken via direct calls to get() and put(), get and put now
require a tag string.  The PG tracks individual ref counts for each tag
as well as the total.

Finally, PGs register/unregister themselves on construction/destruction
with OSDService.

As a result, on shutdown, we can check for live pgs and determine where
the references are held.

This behavior is compiled out by default, but can be included with the
--enable-pgrefdebugging flag.

Signed-off-by: Samuel Just <sam.just@inktank.com>
configure.ac
src/osd/OSD.cc
src/osd/OSD.h
src/osd/PG.cc
src/osd/PG.h
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h