osd/: move split_list and split_request into OSD

Signed-off-by: Samuel Just <sam.just@inktank.com>
rgw: set meta object in extra flag when initializing it

As part of the fix for 8452 we moved the meta object initialization.
Missed moving the extra flag initialization that is needed. This breaks
setups where there's a separate extra pool (needed in ec backends).

Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
OSD::calc_priors_during: fix confusing for loop bracing (cosmetic)

Confusing lack of braces is confusing.

Signed-off-by: Samuel Just <sam.just@inktank.com>
OSD::calc_priors_during: handle CRUSH_ITEM_NONE correctly

Fixes: #8507
Signed-off-by: Samuel Just <sam.just@inktank.com>
rgw: reduce calls to rgw_obj.set_obj()

default manifest iterator construction did unneeded init of rgw_obj.
Also add a smarter copy constructor to RGWObjState that does not copy
manifest if not needed.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Make KeyValueStore support set_alloc_hint op

Add a new config let KeyValueStore support configurable strip size.
set_alloc_hint op can affect the strip size of the specified object
and the expect write size will become the strip size of the object.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Add set_alloc_hint test to ceph_test_objectstore

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
OSD: move waiting_for_pg into Session

This way, we can handle pg splits atomically with ms_fast_dispatch.

Signed-off-by: Samuel Just <sam.just@inktank.com>
mon: gather perf stats on session adds, removes, counts

I found myself wanting to know this on a running cluster.

Signed-off-by: Sage Weil <sage@inktank.com>
mon: gather perf stats on elections

Signed-off-by: Sage Weil <sage@inktank.com>
Add upper limit to the write size of set_alloc_hint in KeyValueStore

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Remove SequencerPosition from KeyValueStore

Now KeyValueStore expects kv backend to ensure consistency and there is unusable
for KeyValueStore to store a SequencerPosition.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Fix write operation on a deleted object in the same transaction

If the following op happened:
touch obj
delete obj
write obj

KeyValueStore will fail at "write" operation.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Add test for objectstore

Add remove then write object in a transaction.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Fix for bug #6700

When preparing OSD disks with colocated journals, the intialization process
fails when using dmcrypt. The kernel fails to re-read the partition table after
the storage partition is created because the journal partition is already in use
by dmcrypt. This fix unmaps the journal partition from dmcrypt and allows the
partition table to be read.

Signed-off-by: Stephen F Taylor <steveftaylor@gmail.com>
rgw: cache decoded user info

Instead of accessing the raw user info data, cache the decoded
structure.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: cache bucket info

This is really a partial implementation, so should only be used for
testing.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: an infrastructure for hooking into the raw cache

Extend the RGWCache so that we can chain other caches to it so that when
data is invalidated it notifies them.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: user info uses cache chaining

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: bucket info uses cache chaining

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>