We define 1 to be the only lease "mask" we currently support (for dentry)
and divorce ourselves from the CEPH_LOCK namespace for this purpose. We
did this in c8d7c970e8, but screwed up the
issue function. Fix the caller, and pay attention to @mask here.
Signed-off-by: Sage Weil <sage@newdream.net>
The snap_trimmer is responsible for removing any/all snap objects.
snapdir only exists if snapped objects exist and head doesn't, so it will
get cleaned up when the snapped object(s) do.
- Only check heartbeats when we have heartbeat_lock and osdmap rdlocked,
and thus _know_ heartbeat info and map are in sync. Drop unnecessary
consistency checks.
- Check heartbeats in tick(), since the heartbeat thread may miss it if
it's unlucky.
This fixes a problem where the osd stops part way through pg cleanup. It
seens the old ondisklog bounds, but then fails to load the log, and crashes
on startup.
We just need to zero the ondisklog bounds when we zero the log.
Signed-off-by: Sage Weil <sage@newdream.net>
Only do a simple_sync() if we are stable, auth, and not already sync. The
client request can race with other state changes, so be careful. The
client will also retry on any state change, so we can safely ignore if
things don't look quite right.
This fxes crash:
mds/Locker.cc: In function 'bool Locker::simple_sync(SimpleLock*, bool*)':
mds/Locker.cc:2592: FAILED assert(0)
1: (Locker::handle_file_lock(ScatterLock*, MLock*)+0x2a8) [0x57d328]
2: (MDS::_dispatch(Message*)+0x2165) [0x4a11d5]
3: (MDS::ms_dispatch(Message*)+0x6d) [0x4a169d]
4: (SimpleMessenger::dispatch_entry()+0x733) [0x47c903]
5: (SimpleMessenger::DispatchThread::entry()+0x1c) [0x474bac]
6: (Thread::_entry_func(void*)+0xa) [0x48748a]
7: /lib/libpthread.so.0 [0x7f8af92ff73a]
8: (clone()+0x6d) [0x7f8af852569d]
Need to initialize created and current_parent_since on new snaprealms
when they are created, or else we get incorrect results from the likes of
SnapRealm::get_snap_info() (e.g., parent snaps from before we were
created).
This prevents bleed through of failures (due to not getting hearbeats, due
to us being marked down) so they don't get sent after we are marked back
up again.
This fixes one possible source of up/down flapping...
Make sure the pool exists before calling OSDMap::raw_pg_to_pg(). Fixes
crash on operations shortly after pg pools are created.
Signed-off-by: Sage Weil <sage@newdream.net>
- send_push_op() does a push, nothing else
- push_start() starts a primary->replica push, tracks state
- push_to_replica() ensures we push head first, calculates cloning, etc.
This will slow down writes to degraded objects because we will wait for it
to recover before applying the write. OTOH it will be robust in the case
of large objects. We can optimize the small object update (and overwrite)
cases later.
Signed-off-by: Sage Weil <sage@newdream.net>