Signed-off-by: Sage Weil <sage@redhat.com>
handle.reset_tp_timeout();
}
-void PG::lock(bool no_lockdep)
+void PG::lock(bool no_lockdep) const
{
_lock.Lock(no_lockdep);
// if we have unrecorded dirty state with the lock dropped, there is a bug
* put() should be called on destruction of some previously copied pointer.
* put_unlock() when done with the current pointer (_most common_).
*/
- Mutex _lock;
+ mutable Mutex _lock;
atomic_t ref;
#ifdef PG_DEBUG_REFS
void lock_suspend_timeout(ThreadPool::TPHandle &handle);
- void lock(bool no_lockdep = false);
- void unlock() {
+ void lock(bool no_lockdep = false) const;
+ void unlock() const {
//generic_dout(0) << this << " " << info.pgid << " unlock" << dendl;
assert(!dirty_info);
assert(!dirty_big_info);