mirror of
https://github.com/ceph/ceph
synced 2025-01-29 22:43:40 +00:00
osd: honour result code passed in; tidy-up changesReviewed-by: Sage Weil <sage@redhat.com>
osd: honour result code passed in; tidy-up changes Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
401804e354
@ -1537,7 +1537,7 @@ void FileJournal::write_finish_thread_entry()
|
||||
aio_info *ai = (aio_info *)event[i].obj;
|
||||
if (event[i].res != ai->len) {
|
||||
derr << "aio to " << ai->off << "~" << ai->len
|
||||
<< " wrote " << event[i].res << dendl;
|
||||
<< " returned: " << (int)event[i].res << dendl;
|
||||
assert(0 == "unexpected aio error");
|
||||
}
|
||||
dout(10) << "write_finish_thread_entry aio " << ai->off
|
||||
|
@ -532,13 +532,6 @@ public:
|
||||
return osd_xinfo[osd];
|
||||
}
|
||||
|
||||
int get_any_up_osd() const {
|
||||
for (int i=0; i<max_osd; i++)
|
||||
if (is_up(i))
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int get_next_up_osd_after(int n) const {
|
||||
for (int i = n + 1; i != n; ++i) {
|
||||
if (i >= get_max_osd())
|
||||
|
@ -6844,7 +6844,8 @@ void ReplicatedPG::complete_read_ctx(int result, OpContext *ctx)
|
||||
MOSDOp *m = static_cast<MOSDOp*>(ctx->op->get_req());
|
||||
assert(ctx->async_reads_complete());
|
||||
|
||||
for (vector<OSDOp>::iterator p = ctx->ops.begin(); p != ctx->ops.end(); ++p) {
|
||||
for (vector<OSDOp>::iterator p = ctx->ops.begin();
|
||||
p != ctx->ops.end() && result >= 0; ++p) {
|
||||
if (p->rval < 0 && !(p->op.flags & CEPH_OSD_OP_FLAG_FAILOK)) {
|
||||
result = p->rval;
|
||||
break;
|
||||
|
@ -608,7 +608,7 @@ public:
|
||||
list<pair<boost::tuple<uint64_t, uint64_t, unsigned>,
|
||||
pair<bufferlist*, Context*> > > pending_async_reads;
|
||||
int async_read_result;
|
||||
unsigned inflightreads;
|
||||
int inflightreads;
|
||||
friend struct OnReadComplete;
|
||||
void start_async_reads(ReplicatedPG *pg);
|
||||
void finish_read(ReplicatedPG *pg);
|
||||
@ -924,10 +924,6 @@ protected:
|
||||
// agent
|
||||
boost::scoped_ptr<TierAgentState> agent_state;
|
||||
|
||||
friend struct C_AgentFlushStartStop;
|
||||
friend struct C_AgentEvictStartStop;
|
||||
friend struct C_HitSetFlushing;
|
||||
|
||||
void agent_setup(); ///< initialize agent state
|
||||
bool agent_work(int max) ///< entry point to do some agent work
|
||||
{
|
||||
@ -1297,14 +1293,6 @@ protected:
|
||||
obc3->ondisk_write_unlock();
|
||||
}
|
||||
};
|
||||
struct C_OSD_OndiskWriteUnlockList : public Context {
|
||||
list<ObjectContextRef> *pls;
|
||||
explicit C_OSD_OndiskWriteUnlockList(list<ObjectContextRef> *l) : pls(l) {}
|
||||
void finish(int r) {
|
||||
for (list<ObjectContextRef>::iterator p = pls->begin(); p != pls->end(); ++p)
|
||||
(*p)->ondisk_write_unlock();
|
||||
}
|
||||
};
|
||||
struct C_OSD_AppliedRecoveredObject : public Context {
|
||||
ReplicatedPGRef pg;
|
||||
ObjectContextRef obc;
|
||||
@ -1416,7 +1404,6 @@ protected:
|
||||
virtual void _scrub_clear_state();
|
||||
virtual void _scrub_finish();
|
||||
object_stat_collection_t scrub_cstat;
|
||||
friend class C_ScrubDigestUpdated;
|
||||
|
||||
virtual void _split_into(pg_t child_pgid, PG *child, unsigned split_bits);
|
||||
void apply_and_flush_repops(bool requeue);
|
||||
@ -1448,7 +1435,6 @@ protected:
|
||||
void finish_proxy_write(hobject_t oid, ceph_tid_t tid, int r);
|
||||
void cancel_proxy_write(ProxyWriteOpRef pwop);
|
||||
|
||||
friend struct C_ProxyWrite_Apply;
|
||||
friend struct C_ProxyWrite_Commit;
|
||||
|
||||
public:
|
||||
|
@ -816,8 +816,6 @@ std::string pg_state_string(int state)
|
||||
oss << "scrubbing+";
|
||||
if (state & PG_STATE_DEEP_SCRUB)
|
||||
oss << "deep+";
|
||||
if (state & PG_STATE_SCRUBQ)
|
||||
oss << "scrubq+";
|
||||
if (state & PG_STATE_INCONSISTENT)
|
||||
oss << "inconsistent+";
|
||||
if (state & PG_STATE_PEERING)
|
||||
@ -858,8 +856,6 @@ int pg_string_state(const std::string& state)
|
||||
type = PG_STATE_SPLITTING;
|
||||
else if (state == "scrubbing")
|
||||
type = PG_STATE_SCRUBBING;
|
||||
else if (state == "scrubq")
|
||||
type = PG_STATE_SCRUBQ;
|
||||
else if (state == "degraded")
|
||||
type = PG_STATE_DEGRADED;
|
||||
else if (state == "inconsistent")
|
||||
|
@ -905,7 +905,7 @@ inline ostream& operator<<(ostream& out, const osd_stat_t& s) {
|
||||
//#define PG_STATE_STRAY (1<<6) // i must notify the primary i exist.
|
||||
#define PG_STATE_SPLITTING (1<<7) // i am splitting
|
||||
#define PG_STATE_SCRUBBING (1<<8) // scrubbing
|
||||
#define PG_STATE_SCRUBQ (1<<9) // queued for scrub
|
||||
//#define PG_STATE_SCRUBQ (1<<9) // queued for scrub
|
||||
#define PG_STATE_DEGRADED (1<<10) // pg contains objects with reduced redundancy
|
||||
#define PG_STATE_INCONSISTENT (1<<11) // pg replicas are inconsistent (but shouldn't be)
|
||||
#define PG_STATE_PEERING (1<<12) // pg is (re)peering
|
||||
|
Loading…
Reference in New Issue
Block a user