make misc items as not copyable

These structures are all not copyable.  Make sure we get a link error if
we try.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This commit is contained in:
Sage Weil 2011-06-21 15:58:59 -07:00
parent 4e244f2ae5
commit 74e5c390e2
9 changed files with 28 additions and 1 deletions

View File

@ -44,6 +44,9 @@ class Trace {
delete fs;
}
Trace(const Trace& other);
const Trace& operator=(const Trace& other);
int get_line() { return _line; }
void start();

View File

@ -23,6 +23,9 @@ struct BackTrace {
free(strings);
}
BackTrace(const BackTrace& other);
const BackTrace& operator=(const BackTrace& other);
void print(std::ostream& out);
};

View File

@ -26,7 +26,9 @@ class RWLock
const char *name;
int id;
public:
public:
RWLock(const RWLock& other);
const RWLock& operator=(const RWLock& other);
RWLock(const char *n) : name(n), id(-1) {
pthread_rwlock_init(&L, NULL);

View File

@ -23,6 +23,9 @@ class Thread {
pthread_t thread_id;
public:
Thread(const Thread& other);
const Thread& operator=(const Thread& other);
Thread();
virtual ~Thread();

View File

@ -68,6 +68,9 @@ private:
}
public:
CrushWrapper(const CrushWrapper& other);
const CrushWrapper& operator=(const CrushWrapper& other);
CrushWrapper() : crush(0), have_rmaps(false) {}
~CrushWrapper() {
if (crush) crush_destroy(crush);

View File

@ -31,6 +31,10 @@
*/
class Context {
public:
Context(const Context& other);
const Context& operator=(const Context& other);
Context() {}
virtual ~Context() {} // we want a virtual destructor!!!
virtual void finish(int r) = 0;
};

View File

@ -365,6 +365,9 @@ public:
ReplicatedPG *pg;
OpContext(const OpContext& other);
const OpContext& operator=(const OpContext& other);
OpContext(Message *_op, osd_reqid_t _reqid, vector<OSDOp>& _ops,
ObjectState *_obs, ReplicatedPG *_pg) :
op(_op), reqid(_reqid), ops(_ops), obs(_obs), new_obs(_obs->oi, _obs->exists),

View File

@ -82,6 +82,9 @@ class Filer {
void _probed(Probe *p, const object_t& oid, uint64_t size, utime_t mtime);
public:
Filer(const Filer& other);
const Filer operator=(const Filer& other);
Filer(Objecter *o) : objecter(o) {}
~Filer() {}

View File

@ -169,6 +169,9 @@ class ObjectCacher {
int rdlock_ref; // how many ppl want or are using a READ lock
public:
Object(const Object& other);
const Object& operator=(const Object& other);
Object(ObjectCacher *_oc, sobject_t o, ObjectSet *os, object_locator_t& l) :
oc(_oc),
oid(o), oset(os), set_item(this), oloc(l),