From: Casey Bodley Date: Thu, 19 Mar 2026 16:08:31 +0000 (-0400) Subject: rgw/posix: MPSerializer sets and clears locked status X-Git-Tag: v21.0.0~9^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8538b776cfd9563b5d08511dc0679acec9a13599;p=ceph.git rgw/posix: MPSerializer sets and clears locked status Signed-off-by: Casey Bodley --- diff --git a/src/rgw/driver/posix/rgw_sal_posix.cc b/src/rgw/driver/posix/rgw_sal_posix.cc index eb54567711a..cbf99ef1a30 100644 --- a/src/rgw/driver/posix/rgw_sal_posix.cc +++ b/src/rgw/driver/posix/rgw_sal_posix.cc @@ -3221,12 +3221,19 @@ int MPPOSIXSerializer::try_lock(const DoutPrefixProvider *dpp, ceph::timespan du POSIXBucket* b = static_cast(obj->get_bucket()); if (b->get_dir()->get_type() == ObjectType::MULTIPART && b->get_dir_fd(dpp) > 0) { + locked = true; return 0; } return -ENOENT; } +int MPPOSIXSerializer::unlock(const DoutPrefixProvider *dpp, optional_yield y) +{ + clear_locked(); + return 0; +} + int POSIXObject::transition(Bucket* bucket, const rgw_placement_rule& placement_rule, const real_time& mtime, diff --git a/src/rgw/driver/posix/rgw_sal_posix.h b/src/rgw/driver/posix/rgw_sal_posix.h index 4e6eb0ed255..dd63ea77507 100644 --- a/src/rgw/driver/posix/rgw_sal_posix.h +++ b/src/rgw/driver/posix/rgw_sal_posix.h @@ -1403,7 +1403,7 @@ public: MPPOSIXSerializer(const DoutPrefixProvider *dpp, POSIXDriver* driver, POSIXObject* _obj, const std::string& lock_name) : obj(_obj) {} virtual int try_lock(const DoutPrefixProvider *dpp, ceph::timespan dur, optional_yield y) override; - virtual int unlock(const DoutPrefixProvider* dpp, optional_yield y) override { return 0; } + virtual int unlock(const DoutPrefixProvider* dpp, optional_yield y) override; }; } } // namespace rgw::sal