]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: PG::_scan_snaps: apply_transaction -> queue_transaction
authorMykola Golub <mgolub@suse.com>
Tue, 30 Oct 2018 08:36:58 +0000 (10:36 +0200)
committerMykola Golub <mgolub@suse.com>
Tue, 30 Oct 2018 14:56:04 +0000 (16:56 +0200)
Using apply_transaction when holding the pg lock is not safe.

(partially cherry picked from commit 907b6281e99ece3677dd7b012cf4955731db6120)

Signed-off-by: Mykola Golub <mgolub@suse.com>
src/osd/PG.cc

index 4314b9b0b7fd02aa3169fbad60ceb961d2a8b902..12dd75d7281494681dca67a2ca7f97c407d0ce2f 100644 (file)
@@ -3915,9 +3915,9 @@ void PG::_scan_snaps(ScrubMap &smap)
                            << "...repaired";
        }
        snap_mapper.add_oid(hoid, oi_snaps, &_t);
-       r = osd->store->apply_transaction(osr.get(), std::move(t));
+       r = osd->store->queue_transaction(osr.get(), std::move(t), nullptr);
        if (r != 0) {
-         derr << __func__ << ": apply_transaction got " << cpp_strerror(r)
+         derr << __func__ << ": queue_transaction got " << cpp_strerror(r)
               << dendl;
        }
       }