From: Radoslaw Zarzynski Date: Mon, 2 May 2016 13:23:43 +0000 (+0200) Subject: rgw: hermetize soft thresholds of RGWQuotaInfo. X-Git-Tag: v11.0.0~349^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6ae81b10de91182ec71d87858f7b08bf8e94a60d;p=ceph.git rgw: hermetize soft thresholds of RGWQuotaInfo. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/rgw/rgw_quota.h b/src/rgw/rgw_quota.h index d95128841e71..43f22dfabb10 100644 --- a/src/rgw/rgw_quota.h +++ b/src/rgw/rgw_quota.h @@ -24,14 +24,27 @@ class RGWRados; class JSONObj; struct RGWQuotaInfo { + template friend class RGWQuotaCache; +protected: + /* The quota thresholds after which comparing against cached storage stats + * is disallowed. Those fields may be accessed only by the RGWQuotaCache. + * They are not intended as tunables but rather as a mean to store results + * of repeating calculations in the quota cache subsystem. */ + int64_t max_size_soft_threshold; + int64_t max_objs_soft_threshold; + +public: int64_t max_size_kb; int64_t max_objects; bool enabled; - int64_t max_size_soft_threshold; - int64_t max_objs_soft_threshold; - RGWQuotaInfo() : max_size_kb(-1), max_objects(-1), enabled(false), - max_size_soft_threshold(-1), max_objs_soft_threshold(-1) {} + RGWQuotaInfo() + : max_size_soft_threshold(-1), + max_objs_soft_threshold(-1), + max_size_kb(-1), + max_objects(-1), + enabled(false) { + } void encode(bufferlist& bl) const { ENCODE_START(1, 1, bl);