summaryrefslogtreecommitdiffstats
path: root/src/rgw/services/svc_bucket.h
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@redhat.com>2019-03-05 21:07:24 +0100
committerCasey Bodley <cbodley@redhat.com>2019-07-29 21:20:46 +0200
commit488583ad4e7eb0fd852aaba8e56fd2b517496fae (patch)
treec8e31e57d6c638d8ab176e1bc9b5d701a196da90 /src/rgw/services/svc_bucket.h
parentrgw: move helper code out of rgw_rados.cc (diff)
downloadceph-488583ad4e7eb0fd852aaba8e56fd2b517496fae.tar.xz
ceph-488583ad4e7eb0fd852aaba8e56fd2b517496fae.zip
rgw: svc bucket: set bucket instance info
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Diffstat (limited to '')
-rw-r--r--src/rgw/services/svc_bucket.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/rgw/services/svc_bucket.h b/src/rgw/services/svc_bucket.h
index 2657548620a..a4a734522a4 100644
--- a/src/rgw/services/svc_bucket.h
+++ b/src/rgw/services/svc_bucket.h
@@ -95,6 +95,10 @@ public:
boost::optional<obj_version> refresh_version,
optional_yield y);
+ int write_bucket_instance_info(RGWBucketInfo& info,
+ bool exclusive,
+ real_time mtime,
+ map<string, bufferlist> *pattrs);
public:
Instance(RGWSI_Bucket *_bucket_svc,
RGWSysObjectCtx& _ctx,
@@ -163,9 +167,41 @@ public:
int exec();
};
+ struct SetOp {
+ Instance& source;
+
+ ceph::real_time mtime;
+ map<string, bufferlist> *pattrs{nullptr};
+ bool exclusive{false};
+
+
+ SetOp& set_mtime(const ceph::real_time& _mtime) {
+ mtime = _mtime;
+ return *this;
+ }
+
+ SetOp& set_attrs(map<string, bufferlist> *_attrs) {
+ pattrs = _attrs;
+ return *this;
+ }
+
+ SetOp& set_exclusive(bool _exclusive) {
+ exclusive = _exclusive;
+ return *this;
+ }
+
+ SetOp(Instance& _source) : source(_source) {}
+
+ int exec();
+ };
+
GetOp get_op() {
return GetOp(*this);
}
+
+ SetOp set_op() {
+ return SetOp(*this);
+ }
};
Instance instance(RGWSysObjectCtx& _ctx,