Skip to content

Commit

Permalink
Merge pull request #46022 from linuxbox2/wip-dbstore-nfs
Browse files Browse the repository at this point in the history
librgw: teach librgw about rgw_backend_store
  • Loading branch information
mattbenjamin committed Apr 27, 2022
2 parents 1daa027 + a40574e commit c0c0eb8
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion src/rgw/librgw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,44 @@ namespace rgw {
g_conf()->rgw_run_sync_thread &&
g_conf()->rgw_nfs_run_sync_thread;

bool rgw_d3n_datacache_enabled =
cct->_conf->rgw_d3n_l1_local_datacache_enabled;
if (rgw_d3n_datacache_enabled &&
(cct->_conf->rgw_max_chunk_size != cct->_conf->rgw_obj_stripe_size)) {
lsubdout(cct, rgw_datacache, 0)
<< "rgw_d3n: WARNING: D3N DataCache disabling (D3N requires that "
"the chunk_size equals stripe_size)"
<< dendl;
rgw_d3n_datacache_enabled = false;
}
if (rgw_d3n_datacache_enabled && !cct->_conf->rgw_beast_enable_async) {
lsubdout(cct, rgw_datacache, 0)
<< "rgw_d3n: WARNING: D3N DataCache disabling (D3N requires yield "
"context - rgw_beast_enable_async=true)"
<< dendl;
rgw_d3n_datacache_enabled = false;
}
lsubdout(cct, rgw, 1) << "D3N datacache enabled: "
<< rgw_d3n_datacache_enabled << dendl;

std::string rgw_store = (!rgw_d3n_datacache_enabled) ? "rados" : "d3n";

const auto &config_store =
g_conf().get_val<std::string>("rgw_backend_store");
#ifdef WITH_RADOSGW_DBSTORE
if (config_store == "dbstore") {
rgw_store = "dbstore";
}
#endif

#ifdef WITH_RADOSGW_MOTR
if (config_store == "motr") {
rgw_store = "motr";
}
#endif

store = StoreManager::get_storage(this, g_ceph_context,
"rados",
rgw_store,
run_gc,
run_lc,
run_quota,
Expand Down

0 comments on commit c0c0eb8

Please sign in to comment.