]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Added RGWPutObjEncryptFilter. Will be used for encryption and compression filters.
authorAdam Kupczyk <akupczyk@mirantis.com>
Thu, 7 Apr 2016 14:09:49 +0000 (16:09 +0200)
committerAdam Kupczyk <akupczyk@mirantis.com>
Wed, 2 Nov 2016 10:34:50 +0000 (11:34 +0100)
Signed-off-by: Adam Kupczyk (akupczyk@mirantis.com)
src/rgw/rgw_op.cc

index 292cb531310c69ec197b3dbc14d45fc371caf00c..0b886ea9bf8273f5516ef98d041a934000318e24 100644 (file)
@@ -2818,6 +2818,24 @@ int RGWPutObjProcessor_Multipart::do_complete(string& etag, real_time *mtime, re
 }
 
 
+
+class RGWPutObjEncryptFilter : public RGWPutObjDataProcessor
+{
+protected:
+  RGWPutObjDataProcessor& next;
+public:
+  RGWPutObjEncryptFilter(RGWPutObjDataProcessor& next) :
+  next(next){}
+  virtual ~RGWPutObjEncryptFilter(){}
+  virtual int handle_data(bufferlist& bl, off_t ofs, void **phandle, bool *again) {
+    return next.handle_data(bl, ofs, phandle, again);
+  }
+  virtual int throttle_data(void *handle, bool need_to_wait) {
+    return next.throttle_data(handle, need_to_wait);
+  }
+}; /* RGWPutObjEncryptFilter */
+
+
 RGWPutObjProcessor *RGWPutObj::select_processor(RGWObjectCtx& obj_ctx, bool *is_multipart)
 {
   RGWPutObjProcessor *processor;