mirror of
https://github.com/ceph/ceph
synced 2025-02-22 02:27:29 +00:00
mds: lock TrackedOp when dumping
The MDS does not generally bother locking a Mutation before changing anything so this lock provides weak protection. In any case, try to improve on that... Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
parent
60d1bdb1f5
commit
9d75d6b0bd
@ -481,6 +481,7 @@ void MDRequestImpl::dump(Formatter *f) const
|
||||
|
||||
void MDRequestImpl::_dump(Formatter *f) const
|
||||
{
|
||||
std::lock_guard l(lock);
|
||||
f->dump_string("flag_point", _get_state_string());
|
||||
f->dump_stream("reqid") << reqid;
|
||||
{
|
||||
@ -527,9 +528,9 @@ void MDRequestImpl::_dump(Formatter *f) const
|
||||
f->dump_string("op_type", "no_available_op_found");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
f->open_array_section("events");
|
||||
std::lock_guard l(lock);
|
||||
for (auto& i : events) {
|
||||
f->dump_object("event", i);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user