updated "sample.ceph.conf":

I've made the following changes to simplify initial cluster configuration:

 * Removed deprecated option(s).
 * Removed overrides for default paths that are "not recommended to change".
 * Added comments with keys' descriptions, types and defaults.
 * Added references to relevant on-line docs;
   sorted keys according to their respective docs sections (pages).
 * Use different types of comments for annotations ('#')
   and for keys/values (';').
 * Added many useful keys.
 * Commented some lines to make sample config "neutral". The idea is to
   let users to un-comment what they need rather than remove sample sections
   that they surely won't be using as is.

Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
rgw: don't return -ENOENT in put_obj_meta()

Fixes: #7168

An object put may race with the same object's delete. In this case just
ignore the error, same behavior as if object was created and then
removed.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: handle racing object puts when object doesn't exist

If the object didn't exist before and now we have multiple puts coming
in concurrently, we need to make sure that we behave correctly. Only one
needs to win, the other one can fail silently. We do that by setting
exclusive flag on the object creation and handling the error correctly.
Note that we still want to return -EEXIST in some cases (when the
exclusive flag is passed to put_obj_meta(), e.g., on bucket creation).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: new user objclass

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: replace user bucket listing with objclass call

instead of directly accessing the omap operation

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: move bucket add / remove to new user objclass

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
cls/user: accounting functionality

Keep user total accounting in omap header, handle add/dec functionality.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
cls/user: a new op to retrieve user header

user header holds user total stats

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw, radosgw-admin, cls/user: retrieve user stats

add a new op to retrieve user header, new radosgw-admin command to stat
user.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
cls/user: some fixes + handle old buckets case

If a bucket was created prior to the new accounting, we can't substract
the old values, as the header stats didn't account for them.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
radosgw-admin: bucket stats --sync-stats [--bucket=...]

Sync user stats, either for a single buckets, or for all user's buckets.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: pass bucket owner all around

User quota operations require that we know who the actual user we do the
operation on is. Pass that info when creating new object and when
removing objects.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: rename RGWBucketStats to RGWStorageStats

make it more generic, will be reused for user's stats.

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

bucket quota cache is going to be reused, add a new abstract layer.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: move some code around, no actual changes

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: extend infrastructure to handle user stats read

Some helper functions that return data in required format for quota, add
async functions.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: implement quota handlers for user stats

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

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
radosgw-admin: user quota interface

also add needed functionality in RGWUser

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: enable user quota

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