We're not allowed to call acquire_locks again once we've completed locking.
Do it in the caller. Add a helper that will also take an rdlock to ensure
the anchor doesn't go away due to a racing operation.
Observed symptom was touch foo on one node, and missing from ls on another
node.
Since auth rdlock isn't allowed for LOCk, it clearly shouldn't be for
LOCK->SYNC while e.g. wrlock modifications are still being flushed to the
journal and aren't yet applied.
We can get a dentry that is trimmable (e.g. null) under a new unlinked dir,
which has no subtree. This will only happen on the auth. In that case,
having no container is harmless--it's only needed for replicas.
This fixes the following crash:
mds/MDCache.cc: In function 'void MDCache::trim_dentry(CDentry*, std::map<int, MCacheExpire*, std::less<int>, std::allocator<std::pair<const int, MCacheExpire*> > >&)':
mds/MDCache.cc:4797: FAILED assert(con)
1: (MDCache::trim(int)+0x214) [0x4ffbc4]
2: (MDS::tick()+0x4c1) [0x48f3b1]
3: (SafeTimer::EventWrapper::finish(int)+0x269) [0x683a89]
4: (Timer::timer_entry()+0x819) [0x685909]
5: (Timer::TimerThread::entry()+0xd) [0x47528d]
6: (Thread::_entry_func(void*)+0x7) [0x48a8a7]
7: /lib/libpthread.so.0 [0x7ffe62356fc7]
8: (clone()+0x6d) [0x7ffe615835ad]
NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
Signed-off-by: Sage Weil <sage@newdream.net>
The OSD was using pg_to_up_acting, the client uses pg_to_acting, and their
calculations of 'acting' weren't consistent because the latter did not
consider pg_temp.
Use new helpers to clean this up.
Signed-off-by: Sage Weil <sage@newdream.net>
We can get a dentry that is trimmable (e.g. null) under a new unlinked dir,
which has no subtree. This will only happen on the auth. In that case,
having no container is harmless--it's only needed for replicas.
This fixes the following crash:
mds/MDCache.cc: In function 'void MDCache::trim_dentry(CDentry*, std::map<int, MCacheExpire*, std::less<int>, std::allocator<std::pair<const int, MCacheExpire*> > >&)':
mds/MDCache.cc:4797: FAILED assert(con)
1: (MDCache::trim(int)+0x214) [0x4ffbc4]
2: (MDS::tick()+0x4c1) [0x48f3b1]
3: (SafeTimer::EventWrapper::finish(int)+0x269) [0x683a89]
4: (Timer::timer_entry()+0x819) [0x685909]
5: (Timer::TimerThread::entry()+0xd) [0x47528d]
6: (Thread::_entry_func(void*)+0x7) [0x48a8a7]
7: /lib/libpthread.so.0 [0x7ffe62356fc7]
8: (clone()+0x6d) [0x7ffe615835ad]
NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
Signed-off-by: Sage Weil <sage@newdream.net>
The OSD was using pg_to_up_acting, the client uses pg_to_acting, and their
calculations of 'acting' weren't consistent because the latter did not
consider pg_temp.
Use new helpers to clean this up.
Signed-off-by: Sage Weil <sage@newdream.net>
because the session close clears connection->priv. We need to check at
each site anyway, either for null session, or for session->closed. So
check for null session.
Conflicts:
src/mon/Monitor.cc
src/mon/OSDMonitor.cc
src/mon/PGMonitor.cc
because the session close clears connection->priv. We need to check at
each site anyway, either for null session, or for session->closed. So
check for null session.