rgw: initial work to separate bucket name and instance

Bucket info now resides in an instance specific object. The
old bucket info object now contains a pointer to the new
instance.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: encode bucket info only after setting a flag

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: init member variable

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix policy read

policy reading used to have exact same logic for both buckets
and objects, however, we now need to read bucket attributes
through get_bucket_info().

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

reuse bucket info, no need to reread it again.

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

This ties it to the specific object instance info.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: put_bucket_info() uses objv_tracker in bucket info

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: create meta handler for bucket instance

Create utility functions for reading writing bucket entry
point and bucket instance. Add a separate meta handler for
bucket instance.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: use new instance handler for bucket operations

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: format bucket.instance meta entries nicely

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: data log contains bucket instance info in key

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: add a system request param to select op bucket instance

Added rgwx-bucket-instance request param that selects the actual bucket
instance to use for this request.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: bucket entry point contains owner, other fix

We now keep the owner at the bucket entry point. Also, reading
bucket info at RGWCreateBucket::execute(), because previous changes
has made it so that we didn't have the required bucket info
initialized there.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: multiple fixes related to metadata, bucket creation

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
cls_ver: rename version xattr, add some more logging

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: add str_startswith()

useful util

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: filter read xattrs

We're only interested in object xattrs that have specific rgw.user
prefix.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fixes to object versioning tracking

There are a few different cases for setting the object version.
Either we need to create a new version, or we need to set the
version provided (one metadata put). We also need to make sure
that we log the correct previous version of the object. This
commit fixes a few cases.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: unlink bucket from user on metadata rm bucket:< bucket>

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: some more internal api cleanups

Use of rgw_bucket when referring to the bucket instance,
use bucket name when referring to the bucket entry point.
Also, remove bucket input param where not needed (internally
was using the bucket structure from the bucket info).

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