summaryrefslogtreecommitdiffstats
path: root/src/rgw/driver/daos
diff options
context:
space:
mode:
authorMatt Benjamin <mbenjamin@redhat.com>2024-04-10 23:58:15 +0200
committerMatt Benjamin <mbenjamin@redhat.com>2024-07-03 20:38:14 +0200
commit0b9bbcbd60e7b5a3f05fadc08dd6353412c169f8 (patch)
treec9b4df286bcc399929f10581d7a0186318ca2ba8 /src/rgw/driver/daos
parentrgw_cksum: test round-trip constructor (armored) (diff)
downloadceph-0b9bbcbd60e7b5a3f05fadc08dd6353412c169f8.tar.xz
ceph-0b9bbcbd60e7b5a3f05fadc08dd6353412c169f8.zip
rgw_cksum: multipart upload checksums
includes commits: * fixes init-multipart header return * introduce checksum to SAL MultipartPart interface * thread optional checksum through DataProcessor * code complete multipart checksum verify * fix formatter * fix ckecksum format for multipart objects in GET/HEAD ops * always return parts_count from ReadOp::prepare() if applicable This behavior is used when returning the checksum of a multipart upload object. * tweak conditional multipart_parts_count * add checksum output to ListMultipart * fix nil-return from GetHeaderCksumResult * re-arm truncated if re-entering list-parts * complete-multipart w/list-parts * validate supplied checksum in CompleteMultipart * verify checksum type against initial checksum algorithm * rgw_op: suppress more x-amz headers * final fixes and cleanups * remove unused t0 Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Diffstat (limited to 'src/rgw/driver/daos')
-rw-r--r--src/rgw/driver/daos/rgw_sal_daos.cc2
-rw-r--r--src/rgw/driver/daos/rgw_sal_daos.h6
2 files changed, 8 insertions, 0 deletions
diff --git a/src/rgw/driver/daos/rgw_sal_daos.cc b/src/rgw/driver/daos/rgw_sal_daos.cc
index 703e8dd77bf..6d83c7d159a 100644
--- a/src/rgw/driver/daos/rgw_sal_daos.cc
+++ b/src/rgw/driver/daos/rgw_sal_daos.cc
@@ -1596,6 +1596,7 @@ int DaosMultipartUpload::init(const DoutPrefixProvider* dpp, optional_yield y,
multipart_upload_info upload_info;
upload_info.dest_placement = dest_placement;
+ upload_info.cksum_type = cksum_type;
ent.encode(bl);
encode(attrs, bl);
@@ -1968,6 +1969,7 @@ int DaosMultipartUpload::get_info(const DoutPrefixProvider* dpp,
// Now decode the placement rule
decode(upload_info, iter);
+ cksum_type = upload_info.cksum_type;
placement = upload_info.dest_placement;
*rule = &placement;
diff --git a/src/rgw/driver/daos/rgw_sal_daos.h b/src/rgw/driver/daos/rgw_sal_daos.h
index 39749a0d33c..8cff96088ee 100644
--- a/src/rgw/driver/daos/rgw_sal_daos.h
+++ b/src/rgw/driver/daos/rgw_sal_daos.h
@@ -742,6 +742,7 @@ class DaosAtomicWriter : public StoreWriter {
virtual int complete(size_t accounted_size, const std::string& etag,
ceph::real_time* mtime, ceph::real_time set_mtime,
std::map<std::string, bufferlist>& attrs,
+ const std::optional<rgw::cksum::Cksum>& cksum,
ceph::real_time delete_at, const char* if_match,
const char* if_nomatch, const std::string* user_data,
rgw_zone_set* zones_trace, bool* canceled,
@@ -788,6 +789,7 @@ class DaosMultipartWriter : public StoreWriter {
virtual int complete(size_t accounted_size, const std::string& etag,
ceph::real_time* mtime, ceph::real_time set_mtime,
std::map<std::string, bufferlist>& attrs,
+ const std::optional<rgw::cksum::Cksum>& cksum,
ceph::real_time delete_at, const char* if_match,
const char* if_nomatch, const std::string* user_data,
rgw_zone_set* zones_trace, bool* canceled,
@@ -810,6 +812,10 @@ class DaosMultipartPart : public StoreMultipartPart {
virtual const std::string& get_etag() { return info.etag; }
virtual ceph::real_time& get_mtime() { return info.modified; }
+ virtual const std::optional<rgw::cksum::Cksum>& get_cksum() {
+ return info.cksum;
+ }
+
friend class DaosMultipartUpload;
};