]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/posix: MPSerializer sets and clears locked status 67696/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 19 Mar 2026 16:08:31 +0000 (12:08 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 19 Mar 2026 17:21:12 +0000 (13:21 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/driver/posix/rgw_sal_posix.cc
src/rgw/driver/posix/rgw_sal_posix.h

index eb54567711a666a4d5d495e17b0aa38e61a65e66..cbf99ef1a30522a36609bae9ca9b7b7852b198af 100644 (file)
@@ -3221,12 +3221,19 @@ int MPPOSIXSerializer::try_lock(const DoutPrefixProvider *dpp, ceph::timespan du
 
   POSIXBucket* b = static_cast<POSIXBucket*>(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,
index 4e6eb0ed255ecd07ca9464bc2398e41cd0b85ef9..dd63ea77507a0de00ee9c537b187c045f8e3df54 100644 (file)
@@ -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