Epoch barrier instructs us to avoid sending (i.e. pause) any OSD ops
until we see a barrier epoch. The only thing epoch_barrier check in
target_should_be_paused() does is keep already paused ops paused. We
need to actually pause incoming OSD ops in _op_submit().
Fixes: http://tracker.ceph.com/issues/19396
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
bool need_send = false;
- if ((op->target.flags & CEPH_OSD_FLAG_WRITE) &&
- osdmap->test_flag(CEPH_OSDMAP_PAUSEWR)) {
+ if (osdmap->get_epoch() < epoch_barrier) {
+ ldout(cct, 10) << " barrier, paused " << op << " tid " << op->tid
+ << dendl;
+ op->target.paused = true;
+ _maybe_request_map();
+ } else if ((op->target.flags & CEPH_OSD_FLAG_WRITE) &&
+ osdmap->test_flag(CEPH_OSDMAP_PAUSEWR)) {
ldout(cct, 10) << " paused modify " << op << " tid " << op->tid
<< dendl;
op->target.paused = true;