mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
Merge pull request #11692 from stiopaa1/mds_flock_addConstToMemFun
mds/flock: add const to member functions
This commit is contained in:
commit
52efd27aec
@ -28,9 +28,9 @@ ceph_lock_state_t::~ceph_lock_state_t()
|
||||
}
|
||||
}
|
||||
|
||||
bool ceph_lock_state_t::is_waiting(const ceph_filelock &fl)
|
||||
bool ceph_lock_state_t::is_waiting(const ceph_filelock &fl) const
|
||||
{
|
||||
multimap<uint64_t, ceph_filelock>::iterator p = waiting_locks.find(fl.start);
|
||||
multimap<uint64_t, ceph_filelock>::const_iterator p = waiting_locks.find(fl.start);
|
||||
while (p != waiting_locks.end()) {
|
||||
if (p->second.start > fl.start)
|
||||
return false;
|
||||
@ -77,7 +77,7 @@ void ceph_lock_state_t::remove_waiting(const ceph_filelock& fl)
|
||||
bool ceph_lock_state_t::is_deadlock(const ceph_filelock& fl,
|
||||
list<multimap<uint64_t, ceph_filelock>::iterator>&
|
||||
overlapping_locks,
|
||||
const ceph_filelock *first_fl, unsigned depth)
|
||||
const ceph_filelock *first_fl, unsigned depth) const
|
||||
{
|
||||
ldout(cct,15) << "is_deadlock " << fl << dendl;
|
||||
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
* @param fl The filelock to check for
|
||||
* @returns True if the lock is waiting, false otherwise
|
||||
*/
|
||||
bool is_waiting(const ceph_filelock &fl);
|
||||
bool is_waiting(const ceph_filelock &fl) const;
|
||||
/**
|
||||
* Remove a lock from the waiting_locks list
|
||||
*
|
||||
@ -144,7 +144,7 @@ private:
|
||||
bool is_deadlock(const ceph_filelock& fl,
|
||||
list<multimap<uint64_t, ceph_filelock>::iterator>&
|
||||
overlapping_locks,
|
||||
const ceph_filelock *first_fl=NULL, unsigned depth=0);
|
||||
const ceph_filelock *first_fl=NULL, unsigned depth=0) const;
|
||||
|
||||
/**
|
||||
* Add a lock to the waiting_locks list
|
||||
|
Loading…
Reference in New Issue
Block a user