From: myoungwon oh Date: Sat, 31 Oct 2020 08:19:43 +0000 (+0900) Subject: osd: return an error earlier in start_flush() if non-blocking is enabled X-Git-Tag: v16.1.0~374^2~26 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d1d7a96df206f801f9de065c7ca05be28f6a32cb;p=ceph.git osd: return an error earlier in start_flush() if non-blocking is enabled Signed-off-by: Myoungwon Oh --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 27f71605ca24..3d969585f65d 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10012,9 +10012,7 @@ int PrimaryLogPG::start_dedup(OpRequestRef op, ObjectContextRef obc) const object_info_t& oi = obc->obs.oi; const hobject_t& soid = oi.soid; - if (!obc->is_blocked()) { - return -EINVAL; - } + ceph_assert(obc->is_blocked()); /* * The operations to make dedup chunks are tracked by a ManifestOp. @@ -10184,6 +10182,7 @@ void PrimaryLogPG::finish_set_dedup(hobject_t oid, int r, ceph_tid_t tid, uint64 osd->reply_op_error(mop->op, -EINVAL); return; } + ceph_assert(obc->is_blocked()); obc->stop_block(); kick_object_context_blocked(obc); if (r < 0) { @@ -10264,6 +10263,13 @@ int PrimaryLogPG::start_flush( snapset = obc->ssc->snapset; } + if (obc->obs.oi.has_manifest() && obc->obs.oi.manifest.is_chunked()) { + // current dedup tier only supports blocking operation + if (!blocking) { + return -EOPNOTSUPP; + } + } + // verify there are no (older) check for dirty clones { dout(20) << " snapset " << snapset << dendl;