dout(10) << "removing coid " << coid << " from snap collections "
<< to_remove << " and adding to snap collections "
- << to_create << dendl;
+ << to_create << " for final snaps " << coi.snaps << dendl;
ctx->log.push_back(pg_log_entry_t(pg_log_entry_t::MODIFY, coid, coi.version, coi.prior_version,
osd_reqid_t(), ctx->mtime));
ostream& operator<<(ostream& out, const pg_log_entry_t& e)
{
- return out << e.version << " (" << e.prior_version << ") "
- << e.get_op_name() << ' ' << e.soid << " by " << e.reqid << " " << e.mtime;
+ out << e.version << " (" << e.prior_version << ") "
+ << e.get_op_name() << ' ' << e.soid << " by " << e.reqid << " " << e.mtime;
+ if (e.snaps.length()) {
+ vector<snapid_t> snaps;
+ bufferlist c = e.snaps;
+ bufferlist::iterator p = c.begin();
+ try {
+ ::decode(snaps, p);
+ } catch (...) {
+ snaps.clear();
+ }
+ out << " snaps " << snaps;
+ }
+ return out;
}