mon: simplify 'osd create <uuid>' command

Make the flow clearer for the three cases (exists, about to exist, new).

Signed-off-by: Sage Weil <sage@newdream.net>
Makefile: fix $shell_scripts substution

No spaces here, apparently!

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
global_init: do not count threads before daemonize()

We were verifying that there was only 1 thread (the presumably main()) when
we call daemonize.  However, with the new logging code, we stop a thread
right before the check, and /proc apparently updates asynchronously such
that our attempt to count running threads gives us a bad answer.

Just remove this kludgey check; we'll have to catch this class of bugs
the hard way.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Merge branch 'wip-osd-uuid'

Reviewed-by: Greg Farnum <greg@inktank.com>
Merge branch 'wip-crush-update'

Reviewed-by: Greg Farnum <greg@inktank.com>
crush: comment and clean up checks for check_item_loc and insert_item

- drop useless cur for check_item_loc
- comment the checks we're doing so the code is understandable
- use name_exists instead of broken get_item_id != 0 check

Signed-off-by: Sage Weil <sage@newdream.net>
crush: improve docs/comments for check_item_loc and insert_item semantics

We don't adjust the internal hierarchy structure (currently).  This is a
bit confusing, so describe the semantics in some detail.

Signed-off-by: Sage Weil <sage@newdream.net>
crush: update_item() should pass an error back to the caller

If you give it a nonsensical loc, it will fail check_item_loc() (false) and
then error out on insert_item().

Reported-by: Sam Just <sam.just@inktank.com>
Signed-off-by: Sage Weil <sage@newdream.net>
objectcacher: don't wait for write waiters; wait after dirtying

We do three things here:

- Wait for the dirty limit to drop _after_ writing into the cache.  This
  means that an active thread can always provide its dirty data to the
  cache for potential writing without waiting (a small win).  It's also
  helpful later... (see below, and next commit)

- Don't wait for other waiters.  If another thread dirtying 1MB and is
  waiting for it, don't wait for them too.  This prevents two threads
  writing 1MB at a time with a limit of 1MB from serializing: both can
  dirty their 1MB and initiate a flush, and they once 1/2 of that has
  flushed one of them will be allowed to proceed.

- Update the flusher to add the dirty_waiting bytes to the amount to
  write so that the OPs will indeed be parallel.

Signed-off-by: Sage Weil <sage@newdream.net>
OpRequest: ignore all ops while the oldest one is still young.

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
Reviewed-by: Sage Weil <sage@newdream.net>
Merge remote-tracking branch 'gh/wip-crush-forcefeed'

Reviewed-by: Sam Just <sam.just@inktank.com>
crush: note that tree bucket size is tree size, not item count

Signed-off-by: Sage Weil <sage@newdream.net>
librados: call safe callback on read operation

This avoids confusion for the user who isn't sure if they should wait for
complete or safe on a read aio.  It also means that you can always wait
for safe for both reads or writes, which can simplify some code.

Dup the roundtrip functional tests to verify this works.

Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Yehuda Sadeh <yehuda.sadeh@inktank.com>
rados_bencher: restructure code (initial work)

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
rados_bencher: restructure code, create RadosBencher class

Preparing for different benchmark backend.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
rados_bencher: fix build

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
rados_bencher -> obj_bencher

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
rados_bencher: abstract away rados specific operations

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
rest_bench: initial work

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
rest_bench: some more implementation

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>