Skip to content

Commit f92cc23

Browse files
authored
Merge pull request ceph#65783 from benhanokh/dedup_permissions
rgw/dedup: Grant dedup process full RGW permissions.
2 parents 91459a9 + a984ad8 commit f92cc23

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

src/rgw/driver/rados/rgw_dedup.cc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ namespace rgw::dedup {
344344
return ret;
345345
}
346346

347-
ret = ioctx.application_enable("rgw_dedup", false);
347+
ret = ioctx.application_enable("rgw", false);
348348
if (ret == 0) {
349349
ldpp_dout(dpp, 10) << __func__ << "::pool " << dedup_pool.name
350350
<< " was associated with dedup app" << dendl;
@@ -1499,23 +1499,24 @@ namespace rgw::dedup {
14991499
const rgw_bucket_dir_entry &entry,
15001500
worker_stats_t *p_worker_stats /*IN-OUT*/)
15011501
{
1502-
// ceph store full blocks so need to round up and multiply by block_size
1503-
uint64_t ondisk_byte_size = calc_on_disk_byte_size(entry.meta.size);
1504-
// count all objects including too small and non default storage_class objs
1505-
p_worker_stats->ingress_obj++;
1506-
p_worker_stats->ingress_obj_bytes += ondisk_byte_size;
1507-
15081502
parsed_etag_t parsed_etag;
15091503
if (unlikely(!parse_etag_string(entry.meta.etag, &parsed_etag))) {
15101504
p_worker_stats->ingress_corrupted_etag++;
1511-
ldpp_dout(dpp, 1) << __func__ << "::ERROR: corrupted etag" << dendl;
1505+
ldpp_dout(dpp, 1) << __func__ << "::ERROR: corrupted etag:" << entry.meta.etag
1506+
<< "::" << p_bucket->get_name() << "/" << entry.key.name << dendl;
15121507
return -EINVAL;
15131508
}
15141509

15151510
if (unlikely((cct->_conf->subsys.should_gather<ceph_subsys_rgw_dedup, 20>()))) {
15161511
show_ingress_bucket_idx_obj(dpp, parsed_etag, p_bucket->get_name(), entry.key.name);
15171512
}
15181513

1514+
// ceph store full blocks so need to round up and multiply by block_size
1515+
uint64_t ondisk_byte_size = calc_on_disk_byte_size(entry.meta.size);
1516+
// count all objects including too small and non default storage_class objs
1517+
p_worker_stats->ingress_obj++;
1518+
p_worker_stats->ingress_obj_bytes += ondisk_byte_size;
1519+
15191520
// We limit dedup to objects from the same storage_class
15201521
// TBD:
15211522
// Should we use a skip-list of storage_classes we should skip (like glacier) ?

src/rgw/driver/rados/rgw_dedup_utils.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,14 @@ namespace rgw::dedup {
310310
this->non_default_storage_class_objs_bytes);
311311
}
312312
else {
313-
ceph_assert(this->default_storage_class_objs == this->ingress_obj);
314-
ceph_assert(this->default_storage_class_objs_bytes == this->ingress_obj_bytes);
313+
if (this->default_storage_class_objs != this->ingress_obj) {
314+
f->dump_unsigned("default storage class objs",
315+
this->default_storage_class_objs);
316+
}
317+
if (this->default_storage_class_objs_bytes != this->ingress_obj_bytes) {
318+
f->dump_unsigned("default storage class objs bytes",
319+
this->default_storage_class_objs_bytes);
320+
}
315321
}
316322
}
317323

0 commit comments

Comments
 (0)