From: Casey Bodley Date: Wed, 21 Nov 2018 18:08:38 +0000 (-0500) Subject: rgw: add append_atomic_test() overload for RGWObjState X-Git-Tag: v14.1.0~704^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f5a64fd9b46267757ee08ecd621d880cf2bbad7a;p=ceph.git rgw: add append_atomic_test() overload for RGWObjState Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 080195b6597..96397c508e7 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -5833,10 +5833,14 @@ int RGWRados::append_atomic_test(RGWObjectCtx *rctx, if (r < 0) return r; - RGWObjState *state = *pstate; + return append_atomic_test(*pstate, op); +} +int RGWRados::append_atomic_test(const RGWObjState* state, + librados::ObjectOperation& op) +{ if (!state->is_atomic) { - ldout(cct, 20) << "state for obj=" << obj << " is not atomic, not appending atomic test" << dendl; + ldout(cct, 20) << "state for obj=" << state->obj << " is not atomic, not appending atomic test" << dendl; return 0; } diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h index 5a9c142cfd0..90045a87f77 100644 --- a/src/rgw/rgw_rados.h +++ b/src/rgw/rgw_rados.h @@ -1255,6 +1255,7 @@ class RGWRados : public AdminSocketHook bool follow_olh, bool assume_noent = false); int append_atomic_test(RGWObjectCtx *rctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj, librados::ObjectOperation& op, RGWObjState **state); + int append_atomic_test(const RGWObjState* astate, librados::ObjectOperation& op); int update_placement_map(); int store_bucket_info(RGWBucketInfo& info, map *pattrs, RGWObjVersionTracker *objv_tracker, bool exclusive);