]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: CopyupRequest::m_pending_copyups doesn't need to be atomic 26483/head
authorIlya Dryomov <idryomov@gmail.com>
Mon, 18 Feb 2019 10:55:55 +0000 (11:55 +0100)
committerJason Dillaman <dillaman@redhat.com>
Wed, 20 Feb 2019 19:12:21 +0000 (14:12 -0500)
It's protected by CopyupRequest::m_lock mutex.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/librbd/io/CopyupRequest.cc
src/librbd/io/CopyupRequest.h

index dddaa369fc8c16091f5995b8dc5841b4498dc92b..334f0ec41623fba2687d7a70e5a7eb1c24b03bc8 100644 (file)
@@ -282,7 +282,7 @@ bool CopyupRequest<I>::should_complete(int *r) {
   ldout(cct, 20) << "oid " << m_oid
                  << ", r " << *r << dendl;
 
-  uint64_t pending_copyups;
+  unsigned pending_copyups;
   switch (m_state) {
   case STATE_READ_FROM_PARENT:
     ldout(cct, 20) << "READ_FROM_PARENT" << dendl;
index fba71202372deb298c6a5efeb3e5ef8d606e7857..d091e8775293b764efaaf46aa51bc624c020f215 100644 (file)
@@ -95,7 +95,7 @@ private:
   bool m_flatten;
   ceph::bufferlist m_copyup_data;
   std::vector<AbstractObjectWriteRequest<ImageCtxT> *> m_pending_requests;
-  std::atomic<unsigned> m_pending_copyups { 0 };
+  unsigned m_pending_copyups = 0;
 
   AsyncOperation m_async_op;