Bug #6101 » ceph-trim-missing-snapshot.patch
src/osd/ReplicatedPG.cc 2015-01-15 05:15:23.000000000 +1100 → src/osd/ReplicatedPG.cc 2015-02-18 14:37:03.000000000 +1100 | ||
---|---|---|
}
|
||
}
|
||
ReplicatedPG::RepGather *ReplicatedPG::trim_object(const hobject_t &coid)
|
||
int ReplicatedPG::trim_object(const hobject_t &coid, ReplicatedPG::RepGather** repgather)
|
||
{
|
||
// load clone info
|
||
bufferlist bl;
|
||
ObjectContextRef obc = get_object_context(coid, false, NULL);
|
||
if (!obc) {
|
||
derr << __func__ << "could not find coid " << coid << dendl;
|
||
assert(0);
|
||
return -ENOENT;
|
||
}
|
||
assert(obc->ssc);
|
||
if (!obc->get_snaptrimmer_write()) {
|
||
dout(10) << __func__ << ": Unable to get a wlock on " << coid << dendl;
|
||
return NULL;
|
||
return -EWOULDBLOCK;
|
||
}
|
||
hobject_t snapoid(
|
||
... | ... | |
obc->put_write(&to_wake, &requeue_recovery, &requeue_snaptrimmer);
|
||
assert(to_wake.empty());
|
||
assert(!requeue_recovery);
|
||
return NULL;
|
||
return -EWOULDBLOCK;
|
||
}
|
||
object_info_t &coi = obc->obs.oi;
|
||
... | ... | |
}
|
||
}
|
||
return repop;
|
||
*repgather = repop;
|
||
return 0;
|
||
}
|
||
void ReplicatedPG::snap_trimmer()
|
||
... | ... | |
}
|
||
dout(10) << "TrimmingObjects react trimming " << pos << dendl;
|
||
RepGather *repop = pg->trim_object(pos);
|
||
if (!repop) {
|
||
RepGather *repop = NULL;
|
||
r = pg->trim_object(pos, &repop);
|
||
if (r == -ENOENT) {
|
||
pg->osd->clog.error() << "TrimmingObjects cannot find snap, dropping from snaptrimq: " << pos << "\n";
|
||
post_event(SnapTrim());
|
||
return transit< WaitingOnReplicas >();
|
||
}
|
||
if (r == -EWOULDBLOCK) {
|
||
dout(10) << __func__ << " could not get write lock on obj "
|
||
<< pos << dendl;
|
||
pos = old_pos;
|
src/osd/ReplicatedPG.h 2015-01-15 05:15:23.000000000 +1100 → src/osd/ReplicatedPG.h 2015-02-18 14:37:03.000000000 +1100 | ||
---|---|---|
ThreadPool::TPHandle &handle);
|
||
void do_backfill(OpRequestRef op);
|
||
RepGather *trim_object(const hobject_t &coid);
|
||
int trim_object(const hobject_t &coid, RepGather** repgather);
|
||
void snap_trimmer();
|
||
int do_osd_ops(OpContext *ctx, vector<OSDOp>& ops);
|
||
- « Previous
- 1
- …
- 9
- 10
- 11
- Next »