Skip to content

Commit

Permalink
osdc/Objecter: If osd full, it should pause read op which w/ rwordere…
Browse files Browse the repository at this point in the history
…d flag.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
(cherry picked from commit 07b2a22)

Conflicts:
	src/osdc/Objecter.cc
  • Loading branch information
majianpeng authored and shinobu-x committed Mar 4, 2017
1 parent 83af8cd commit 5100c5e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/osdc/Objecter.cc
Expand Up @@ -2154,8 +2154,13 @@ ceph_tid_t Objecter::_op_submit(Op *op, RWLock::Context& lc)
ldout(cct, 10) << " paused read " << op << " tid " << last_tid.read() << dendl;
op->target.paused = true;
_maybe_request_map();
} else if ((op->target.flags & CEPH_OSD_FLAG_WRITE) && _osdmap_full_flag()) {
ldout(cct, 0) << " FULL, paused modify " << op << " tid " << last_tid.read() << dendl;
} else if ((op->target.flags & (CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_RWORDERED)) &&
!(op->target.flags & (CEPH_OSD_FLAG_FULL_TRY |
CEPH_OSD_FLAG_FULL_FORCE)) &&
(_osdmap_full_flag() ||
_osdmap_pool_full(op->target.base_oloc.pool))) {
ldout(cct, 0) << " FULL, paused modify " << op << " tid "
<< op->tid << dendl;
op->target.paused = true;
_maybe_request_map();
} else if (!s->is_homeless()) {
Expand Down

0 comments on commit 5100c5e

Please sign in to comment.