summaryrefslogtreecommitdiff
path: root/src/rgw/rgw_quota.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rgw/rgw_quota.h')
-rw-r--r--src/rgw/rgw_quota.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rgw/rgw_quota.h b/src/rgw/rgw_quota.h
index 39cfc62de55..6cdc21c52a5 100644
--- a/src/rgw/rgw_quota.h
+++ b/src/rgw/rgw_quota.h
@@ -3,7 +3,9 @@
#include "include/utime.h"
+#include "include/atomic.h"
#include "common/lru_map.h"
+#include "common/RefCountedObj.h"
class RGWRados;
class JSONObj;
@@ -40,9 +42,12 @@ WRITE_CLASS_ENCODER(RGWQuotaInfo)
class rgw_bucket;
class RGWQuotaHandler {
+ RefCountedWaitObject async_refcount;
public:
RGWQuotaHandler() {}
- virtual ~RGWQuotaHandler() {}
+ virtual ~RGWQuotaHandler() {
+ async_refcount.put_wait(); /* wait for all pending async requests to complete */
+ }
virtual int check_quota(rgw_bucket& bucket, RGWQuotaInfo& bucket_quota,
uint64_t num_objs, uint64_t size) = 0;