]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/TrackedOp: fix race updating description with proper lock
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 26 Jul 2023 16:55:07 +0000 (12:55 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 8 Aug 2023 12:58:40 +0000 (08:58 -0400)
commit36eaa495eb37485796ce57c8c4b1cca603efc193
tree89003258c5fc81ec792459a968c4117c7cd3ce55
parent5f57c526b22af16e8a079aacefcb26cc14202ad2
common/TrackedOp: fix race updating description with proper lock

It is not safe to "cache" a member which may be changed by a racing thread.

This reworks the locking so we can do a light-weight check if the description
is already generated wihtout acquiring the heavier TrackedOp::lock. If it's not
available yet or it needs regenerated, then get the proper locks to generate
it.

Fixes: e45f5c2c33508bec3b177e51fd6cc5fde1f0e674
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/common/TrackedOp.h
src/mds/Mutation.cc
src/mds/Mutation.h
src/mon/MonOpRequest.h
src/osd/OpRequest.cc
src/osd/OpRequest.h