Skip to content

Commit

Permalink
rgw: update cache interface for put_obj_meta
Browse files Browse the repository at this point in the history
This fixes issue ceph#2381.
The method interface was different than the one needed in order
to override the one in RGWRados.

Signed-off-by: Yehuda Sadeh <[email protected]>
Reviewed-by: Sage Weil <[email protected]>
  • Loading branch information
yehudasa committed May 3, 2012
1 parent b5a18ad commit 3228643
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/rgw/rgw_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ class RGWCache : public T
map<string, bufferlist>* rmattrs);
int put_obj_meta(void *ctx, rgw_obj& obj, uint64_t size, time_t *mtime,
map<std::string, bufferlist>& attrs, RGWObjCategory category, bool exclusive,
map<std::string, bufferlist>* rmattrs, const bufferlist *data);
map<std::string, bufferlist>* rmattrs, const bufferlist *data,
RGWObjManifest *manifest);

int put_obj_data(void *ctx, rgw_obj& obj, const char *data,
off_t ofs, size_t len, bool exclusive);
Expand Down Expand Up @@ -338,7 +339,7 @@ int RGWCache<T>::set_attrs(void *ctx, rgw_obj& obj,
template <class T>
int RGWCache<T>::put_obj_meta(void *ctx, rgw_obj& obj, uint64_t size, time_t *mtime,
map<std::string, bufferlist>& attrs, RGWObjCategory category, bool exclusive,
map<std::string, bufferlist>* rmattrs, const bufferlist *data)
map<std::string, bufferlist>* rmattrs, const bufferlist *data, RGWObjManifest *manifest)
{
rgw_bucket bucket;
string oid;
Expand All @@ -355,7 +356,7 @@ int RGWCache<T>::put_obj_meta(void *ctx, rgw_obj& obj, uint64_t size, time_t *mt
info.flags |= CACHE_FLAG_DATA;
}
}
int ret = T::put_obj_meta(ctx, obj, size, mtime, attrs, category, exclusive, rmattrs, data);
int ret = T::put_obj_meta(ctx, obj, size, mtime, attrs, category, exclusive, rmattrs, data, manifest);
if (cacheable) {
string name = normal_name(bucket, oid);
if (ret >= 0) {
Expand Down

0 comments on commit 3228643

Please sign in to comment.