OpTracker::Mutex::lock is there to protect the event list and it is
only used in the mark_event while pushing the events in the list.
It is not used while dumping the contents of the events list.
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
utime_t initiated_at;
list<pair<utime_t, string> > events; /// list of events and their times
- Mutex lock; /// to protect the events list
+ mutable Mutex lock; /// to protect the events list
string current; /// the current state the event is in
uint64_t seq; /// a unique value set by the OpTracker
}
{
f->open_array_section("events");
+ Mutex::Locker l(lock);
for (list<pair<utime_t, string> >::const_iterator i = events.begin();
i != events.end();
++i) {
}
{
f->open_array_section("events");
+ Mutex::Locker l(lock);
for (list<pair<utime_t, string> >::const_iterator i = events.begin();
i != events.end();
++i) {