de-globalize CephXTicketManager and CephXTicketHandler. Also
de-globalize two static functions.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
* Don't allow copying of class atomic_t.
* Remove common/Spinlock.h because it's unecessary
* SimpleMessenger: use atomic var for qlen
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
bufferlist doesn't need to use dout/derr. Only one function used it, and
that was only to return an error string.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
common/Mutex.cc: this is a duplicate of the code in common/lockdep.cc.
Delete the duplicate code.
common/lockdep.cc: require the programmer to register a CephContext to
use with lockdep. If we don't have one, we don't print anything out.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
The de-globalized versions are available in dout.h
Versions relying on globals continue to be available in debug.h
Split md_config_obs_t off into common/config_obs.h. This will make it
possible for DoutStreambuf.h to include just that structure, without
pulling in all of config.h.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
We need to flush before waiting or else our completion (and mark_diryt())
will be out of order with respect to other dir updates.
Signed-off-by: Sage Weil <sage@newdream.net>
As of fc4cc39 new_repop claims the obc reference (from the clonerange
branch) but this caller didn't get fixed.
Signed-off-by: Sage Weil <sage@newdream.net>
If we try to rdlock a snapped inode in snap->sync state, we need to prod
the head inode into SYNC to get the data flushed. Make sure we avoid
XSYN by passing as_anon=true to rdlock_start(head).
Also fix the waiting code. If it succeeds, continue around the loop. If
not, the rdlock_start will add the waiter for us--don't do it again!
Fixes workunit snaps/snaptest-snap-rm-cmp.sh.
Signed-off-by: Sage Weil <sage@newdream.net>
If we are in XSYN, we need to transition first to EXCL before moving on.
Simply going to the other unstable state isn't enough, because if gather
is zero at the end of the method we end up jumping directly to the wrong
state without passing EXCL. Instead, call file_excl(), and continue only
if we got there immediately.
Signed-off-by: Sage Weil <sage@newdream.net>