If the peer has a really old map, send a full map instead of crashing
because we are missing the needed incremental.
Signed-off-by: Sage Weil <sage@newdream.net>
Previously, log.empty meant that the log.head was everion_t(). However,
it was in a few places used to mean that log.head == log.tail. Now,
log.empty means log.head == log.tail and log.null() indicates that
log.head is eversion_t().
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
The oldest osdmap we maintain is a lower bound on last_epoch_clean for the
entire system (assuming the monitor is doing it's job right). We can stop
generating past intervals when we hit it.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
It's no longer called anywhere. Hurray, we don't do our own
read-modify-write cycle any more (and can exploit the power of
btrees later)!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Unfortunately we can't do multiple writes via the interface -- the
second one will clobber the first one. So use the update functionality
and go through that pain instead.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
This function won't be called often once refactoring is done, but
its functionality will be needed for listing, if nothing else.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Right now, they implement the TMAP functions, plus a few obvious
extras to read/write select keys and the header. In the future it
should be easy to switch them to better mapping implementations.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
If the new log does not contain an entry for that oid, it might not yet
be in missing, and we would need to add it.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
If a message is working it's way through _dispatch, and another thread
requeues waiting messages under pg->lock (e.g.
osd->take_waiting(waiting_for_active)), the requeued ops are processed
after the one _dispatch() is chewing on, breaking client ordering.
Instead, add a new OSD::requeue_ops() that reinjects ops back into the
op queue by feeding them to the _handle_*() helpers. Those do last minute
checks before enqueuing the ops.
Fixes: #1490 (again)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
We remove it anyway. If it's missing entirely, just continue and roll
back to the latest snap_ when the user passes --osd-use-stale-snap.
Signed-off-by: Sage Weil <sage@newdream.net>
Static classes with constructors and destructors are dangerous. Explicitly
manage these as part of the server components (OSD, MDS).
Fixes: #1608
Signed-off-by: Sage Weil <sage@newdream.net>
During handle_notify_timeout or ms_handle_reset, watchers are now marked
unconnected via pg->register_unconnected_watcher. A safe timer event has
been added to trigger OSD::handle_watch_timeout.
remove_watchers_and_notifies (called on role change) cleans up these
events before peering.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Pass correct path to configure (fixes SuSE builds).
Use %doc command to install sample.ceph.conf and sample.fetch_conf.
Signed-off-by: Sage Weil <sage@newdream.net>