From 20f90c5608087b5d7adf4e06c0d5b77feb5fb32e Mon Sep 17 00:00:00 2001 From: Neha Ojha Date: Tue, 6 Feb 2018 17:42:54 -0800 Subject: [PATCH] PG: handle degraded object in _rollback_to() Signed-off-by: Neha Ojha --- src/osd/PrimaryLogPG.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index ebe8f27e3fa27..abc713f0698ea 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -7536,6 +7536,11 @@ int PrimaryLogPG::_rollback_to(OpContext *ctx, ceph_osd_op& op) block_write_on_degraded_snap(missing_oid, ctx->op); return ret; } + if(is_degraded_or_backfilling_object(soid)) { + dout(10) << __func__ << " " << soid << " is a degraded or backfilling object" << dendl; + block_write_on_degraded_snap(soid, ctx->op); + return -EAGAIN; + } { ObjectContextRef promote_obc; cache_result_t tier_mode_result; -- 2.39.5