cache_memory_limit = g_conf().get_val<Option::size_t>("mds_cache_memory_limit");
cache_reservation = g_conf().get_val<double>("mds_cache_reservation");
cache_health_threshold = g_conf().get_val<double>("mds_health_cache_threshold");
- forward_all_requests_to_auth = g_conf().get_val<bool>("mds_forward_all_requests_to_auth");
export_ephemeral_distributed_config = g_conf().get_val<bool>("mds_export_ephemeral_distributed");
export_ephemeral_random_config = g_conf().get_val<bool>("mds_export_ephemeral_random");
if (changed.count("mds_cache_trim_decay_rate")) {
trim_counter = DecayCounter(g_conf().get_val<double>("mds_cache_trim_decay_rate"));
}
- if (changed.count("mds_forward_all_requests_to_auth")){
- forward_all_requests_to_auth = g_conf().get_val<bool>("mds_forward_all_requests_to_auth");
- }
migrator->handle_conf_change(changed, mdsmap);
mds->balancer->handle_conf_change(changed, mdsmap);
// dirfrag/dentry is not mine.
mds_authority_t dauth = curdir->authority();
- if (!forward_all_requests_to_auth &&
- forward &&
+ if (forward &&
mdr && mdr->client_request &&
(int)depth < mdr->client_request->get_num_fwd()){
dout(7) << "traverse: snap " << snapid << " and depth " << depth
explicit MDCache(MDSRank *m, PurgeQueue &purge_queue_);
~MDCache();
- bool forward_all_reqs_to_auth() const {
- return forward_all_requests_to_auth;
- }
uint64_t cache_limit_memory(void) {
return cache_memory_limit;
}
uint64_t cache_memory_limit;
double cache_reservation;
double cache_health_threshold;
- bool forward_all_requests_to_auth;
std::array<CInode *, NUM_STRAY> strays{}; // my stray dir
bool export_ephemeral_distributed_config;
recall_throttle(g_conf().get_val<double>("mds_recall_max_decay_rate")),
metrics_handler(metrics_handler)
{
+ forward_all_requests_to_auth = g_conf().get_val<bool>("mds_forward_all_requests_to_auth");
replay_unsafe_with_closed_session = g_conf().get_val<bool>("mds_replay_unsafe_with_closed_session");
cap_revoke_eviction_timeout = g_conf().get_val<double>("mds_cap_revoke_eviction_timeout");
max_snaps_per_dir = g_conf().get_val<uint64_t>("mds_max_snaps_per_dir");
}
void Server::handle_conf_change(const std::set<std::string>& changed) {
+ if (changed.count("mds_forward_all_requests_to_auth")){
+ forward_all_requests_to_auth = g_conf().get_val<bool>("mds_forward_all_requests_to_auth");
+ }
if (changed.count("mds_replay_unsafe_with_closed_session")) {
replay_unsafe_with_closed_session = g_conf().get_val<bool>("mds_replay_unsafe_with_closed_session");
}
DirStat ds;
ds.frag = dir->get_frag();
ds.auth = dir->get_dir_auth().first;
- if (dir->is_auth() && !mdcache->forward_all_reqs_to_auth())
+ if (dir->is_auth() && !forward_all_requests_to_auth)
dir->get_dist_spec(ds.dist, whoami);
dir->encode_dirstat(bl, session->info, ds);
if (!no_want_auth)
want_auth = true;
} else {
+ if (!no_want_auth && forward_all_requests_to_auth)
+ want_auth = true;
flags |= MDS_TRAVERSE_RDLOCK_PATH | MDS_TRAVERSE_RDLOCK_SNAP;
}
if (want_auth)
DirStat ds;
ds.frag = dir->get_frag();
ds.auth = dir->get_dir_auth().first;
- if (dir->is_auth() && !mdcache->forward_all_reqs_to_auth())
+ if (dir->is_auth() && !forward_all_requests_to_auth)
dir->get_dist_spec(ds.dist, mds->get_nodeid());
dir->encode_dirstat(dirbl, mdr->session->info, ds);
feature_bitset_t supported_features;
feature_bitset_t required_client_features;
+ bool forward_all_requests_to_auth = false;
bool replay_unsafe_with_closed_session = false;
double cap_revoke_eviction_timeout = 0;
uint64_t max_snaps_per_dir = 100;