All of lore.kernel.org
 help / color / mirror / Atom feed
* should CephContext be a singleton?
@ 2017-09-13 14:58 Jeff Layton
  2017-09-13 15:09 ` Adam C. Emerson
  2017-09-13 15:16 ` Sage Weil
  0 siblings, 2 replies; 7+ messages in thread
From: Jeff Layton @ 2017-09-13 14:58 UTC (permalink / raw)
  To: ceph-devel

I recently hit the problem described in this bug when rolling some new
tests for cephfs:

    http://tracker.ceph.com/issues/20988

While I hit it in a testcase, I suspect something like ganesha or samba
could also hit this, as they can create several CephContexts in the
course of their duties and their teardown is not necessarily coordinated
in any way.

The problem is basically that the CephContext is a random pile of stuff,
some of which has an effect on global objects (the lockdep stuff, in
particular, but there may be more).

There are a few ways to fix it...we could just ensure that the lockdep
stuff is handled cleanly, but I wonder...is there any real-world
use-case for having multiple CephContexts in a single process image?

It contains stuff like admin sockets, and certain threads are tied to
it, etc. This seems like the sort of thing that should just have a
single instance per process. Should we start moving things in that
direction, or should I look at fixing this another way?

Thanks,
-- 
Jeff Layton <jlayton@redhat.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-09-14 13:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-13 14:58 should CephContext be a singleton? Jeff Layton
2017-09-13 15:09 ` Adam C. Emerson
2017-09-13 15:16   ` John Spray
2017-09-13 15:30     ` Adam C. Emerson
2017-09-14 13:28       ` Jeff Layton
2017-09-13 15:22   ` Jeff Layton
2017-09-13 15:16 ` Sage Weil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.