osd_types: s/stashed/rollback_info_completed and set on create

Originally, this flag indicated that the object had already been stashed and
that therefore recording subsequent changes is unecessary.  We want to set it
on create() as well since operations like [create, writefull] should not need
to stash the object.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Add a new field 'expected_num_objects' to pg_pool_t which denotes the expected number of objects on this pool.

Signed-off-by: Guang Yang (yguang@yahoo-inc.com)
Add a new monitor command to let user specify the expected number of objects during pool creation.

Signed-off-by: Guang Yang (yguang@yahoo-inc.com)
Add a new transaction OP (collection hint) to ObjectStore.
Signed-off-by: Guang Yang (yguang@yahoo-inc.com)
Implement the collection hint transaction, add a new transation type as expected number of objects.
Signed-off-by: Guang Yang (yguang@yahoo-inc.com)
Add tests for the collection hint OP: 1) Store Test 2) Idempotent Test.
Signed-off-by: Guang Yang (yguang@yahoo-inc.com)
OSD: fix wake_pg_waiters revert error in _open_lock_pg

231fe1b685bfbd3db9c81709ca39a29d696b13ad reintroduced erroneously
this call to wake_pg_waiters.  All _create_lock_pg callers handle
calling wake_pg_waiters after the pg lock has been dropped.

Fixes: #8691
Signed-off-by: Samuel Just <sam.just@inktank.com>
OSD: wake_pg_waiters outside of the pgmap write_lock, pg_lock

Signed-off-by: Samuel Just <sam.just@inktank.com>
OSD: rename session_waiting_for_map_lock to session_waiting_lock

This lock will also protect the waiting_for_pg structures in each
session.

Signed-off-by: Samuel Just <sam.just@inktank.com>
OSD: clear_session_waiting_on_map in ms_handle_reset

Signed-off-by: Samuel Just <sam.just@inktank.com>
OSD::shutdown: actually drop sessions waiting on map

There might be messages for which we still don't have the
map.  dispatching waiting won't actually help.

Signed-off-by: Samuel Just <sam.just@inktank.com>
OSD: move waiting_for_pg into the session structures

Each message belongs to a session.  Further, no ordering is implied
between messages which arrived on different sessions.  Breaking the
global waiting_for_pg structure into a per-session structure lets
us avoid the problem of taking a write lock on a global structure
(pg_map_lock) in get_pg_or_queue_for_pg at the cost of some
complexity in updating each session's waiting_for_pg structure when
we receive a new map (due to pg splits) or when we locally create
a pg.

Signed-off-by: Samuel Just <sam.just@inktank.com>
qa/workunits/cephtool/test.sh: fix 'ceph df ...' tests

Broken by ee2dbdb0f5e54fe6f9c5999c032063b084424c4c and friends.

Signed-off-by: Sage Weil <sage@redhat.com>
rados: don't add \n to getxattr

Signed-off-by: Sage Weil <sage@redhat.com>
rados: optionally read setxattr value from stdin

Signed-off-by: Sage Weil <sage@redhat.com>
qa/workunits/rados/test_rados_tool: add a few xattr tests

Signed-off-by: Sage Weil <sage@redhat.com>
rados: use STD{IN,OUT}_FILENO for magic values

Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2218 from ceph/wip-rados-xattr

rados: fix get/setxattr commands up

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
Merge remote-tracking branches 'origin/wip-8396', 'origin/wip-8625', 'guangyy/wip-pg-splitting' and 'upstream/wip-sam-testing2' into wip-sam-testing

Conflicts:
	src/os/CollectionIndex.h