Everyone uses get_conf to get configuration values. So the logic for
defaulting to some value if we can't find the requested key should live
there. Also fix a case in cconf where we could encounter a usage error
and keep on going.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
It's defined in ceph_fs.h.
Fix a bunch of headers that use types without including the headers that
define those types.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
There is some epoch the OSD wants for up_thru, based on when the PG mapping
last changed. However, once the monitor gets to the point where it must
update the map, it should set up_thru to the most recent epoch the OSD has
seen (i.e. the epoch it is known to be "up thru"!). This will hopefully/
frequently avoid any subsequent up_thru requests.
MOSDAlive already has a separate field (in PaxosServiceMessage) to hold the
latest epoch; just fix the constructor to set it properly, and make the
monitor use it. No protocol change, yay!
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Put the epoch we need for up_thru in the request. Putting the most recent
epoch causes incorrect osdmap churn.
Fixes: #824
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
These were previously set by #defines. Pretty stupid
when we have a nice config system already!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
This was broken by the safe_write() switchover; the success return value
is now 0, not the number of bytes written.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
e.g. when I am non-root and specify a key explicitly, no need to complain
about not being able to read root's /etc/ceph/keyring.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This doesn't need to be a hash_map; there will only be an entry
for each PG that gets a message request while it's not active.
Shouldn't be too many PGs that that happens too, right?
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
These are unused (#if 0'd, so no way to use them!) and require
a memory-hogging hash_map. Goodbye!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
waiting_for_[missing|degraded]_object don't need to be
hash_maps, and we don't use stat_object_temp_rd at all.
Swap to map and remove to reduce per-PG memory consumption!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Shouldn't need to include DoutStreambuf.h; that's all implementation.
Don't include Mutex.h, since we don't use it.
*Do* include config.h, since we need it.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Holding the image context lock during snapshot removal prevented the
client from responding to a notify, causing a deadlock. This could be
triggered by removing a snapshot while concurrently adding more to the
same image.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>