Sorry, just realized you're in a different timezone and that the fix/cleanup is actually quite easy and done before you will read this message :-) I've sent a pull request on github. Roald On Fri, Dec 21, 2012 at 12:01 PM, Roald van Loon <roaldvanloon@xxxxxxxxx> wrote: > I see. > > I always thought it was already fully seperated because of the comment > in common/debug.h, saying "Global version of the stuff in > common/dout.h" (although I don't understand why that file is in > common). > > Are there by any chance some docs on how this "ideal world" was > originally designed, so I can help with some of it? It's really > bugging me and stopping me from other things I'm toying with (e.g. the > config thingie), because librados.so won't link. > > Thanks! > > Roald > > > On Thu, Dec 20, 2012 at 7:44 PM, Sage Weil <sage@xxxxxxxxxxx> wrote: >> On Thu, 20 Dec 2012, Dan Mick wrote: >>> dout/err and ldout/err rely on CeohContext being available. It's >>> possible the includes should be separated; i'd have to look more closely >>> to have a real judgment. But the macros really do need a cct to work at >>> all. >> >> Right. >> >> In an ideal world, things that link in g_ceph_context would have a >> separate #include and other code wouldn't see the declaration, but we >> didn't get that far when this was cleaned up a while back. Instead, you >> get a linker error if you, say, do dout(...) instead of ldout(...) in >> something that doesn't link the globals. >> >> sage >> >> >> > >>> On Dec 20, 2012, at 6:52 AM, Roald van Loon <roaldvanloon@xxxxxxxxx> wrote: >>> >>> > Hi ceph devs, >>> > >>> > I was wondering. In common/dout.h is an #include of >>> > global/ceph_context.h, but it is not used there (I stumbled upon it >>> > because while playing around in the codebase, I noticed librados would >>> > not link because of an undefined reference to g_ceph_context). I have >>> > no idea why this include is in dout.h, but it seems that a lot of >>> > different sources fail to compile (because g_ceph_context definition >>> > is missing) when I remove the include from dout.h. >>> > >>> > So it seems like it's used as some sort of forward include (because >>> > dout.h is almost always included through include/Context.h) to make >>> > sure g_ceph_context is defined in most places. >>> > >>> > What is the rationale of having this here? Isn't it better to try to >>> > split global and common as much as possible? >>> > >>> > Ciao, >>> > >>> > Roald >>> > -- >>> > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in >>> > the body of a message to majordomo@xxxxxxxxxxxxxxx >>> > More majordomo info at http://vger.kernel.org/majordomo-info.html >>> -- >>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in >>> the body of a message to majordomo@xxxxxxxxxxxxxxx >>> More majordomo info at http://vger.kernel.org/majordomo-info.html >>> >>> -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html