From: Adam Kupczyk Date: Thu, 7 Apr 2016 14:09:49 +0000 (+0200) Subject: Added RGWPutObjEncryptFilter. Will be used for encryption and compression filters. X-Git-Tag: v11.1.0~429^2~32 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=70ff7147ac3e7e1892c05154ea28c35e9d1ce5f9;p=ceph.git Added RGWPutObjEncryptFilter. Will be used for encryption and compression filters. Signed-off-by: Adam Kupczyk (akupczyk@mirantis.com) --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 292cb531310c..0b886ea9bf82 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -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;