rgw: quota utility class

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: more quota utility stuff

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

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: add bucket quota config to entities

Add bucket quota fields to various entities: regionmap (for global
configuration), user info, bucket info.

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

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: higher level quota check functionality

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

size is in kb

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: check quota before completing write op

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: also check quota before starting write

In that case we only do it if it's not chunked upload (for which we
don't have the content length).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: update quota stats when needed

Now update the quota stats when completing specific operations.

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

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: bucket stats also dump quota info

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: dump quota params even if disabled

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

Can set, disable and enable bucket quota.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: handle negative quota as non-assigned values

This means that we can have a 0 as a quota value.

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

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

A new find_and_update() call to make atomic changes.

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

Use new lru_map::find_and_update() to update internal cache state.

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

Need to have ceph_json.h first due to some boost weirdness.

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

Asynchronously update bucket stats when a period passed, but bucket
stats are within the ttl window.

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