services:
- mds
with_legacy: true
+- name: mds_allow_batched_ops
+ type: bool
+ level: advanced
+ desc: allow MDS to batch lookup/getattr RPCs
+ long_desc: >
+ The MDS will batch a lookup or getattr RPC on the same inode when
+ possible to avoid repetitive locks on metadata and to bypass other
+ requests acquiring write locks. Generally, this should only
+ improve performance but this switch exists to provide a means to
+ turn this behavior off for comparison.
+ default: true
+ services:
+ - mds
+ flags:
+ - runtime
# multiple of size_max that triggers immediate split
- name: mds_bal_fragment_fast_factor
type: float
{
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");
+ allow_batched_ops = g_conf().get_val<bool>("mds_allow_batched_ops");
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");
delegate_inos_pct = g_conf().get_val<uint64_t>("mds_client_delegate_inos_pct");
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_allow_batched_ops")) {
+ allow_batched_ops = g_conf().get_val<bool>("mds_allow_batched_ops");
+ }
if (changed.count("mds_cap_revoke_eviction_timeout")) {
cap_revoke_eviction_timeout = g_conf().get_val<double>("mds_cap_revoke_eviction_timeout");
dout(20) << __func__ << " cap revoke eviction timeout changed to "
if (mask & CEPH_STAT_RSTAT)
want_auth = true; // set want_auth for CEPH_STAT_RSTAT mask
- if (!mdr->is_batch_head() && mdr->can_batch()) {
+ if (!mdr->is_batch_head() && allow_batched_ops && mdr->can_batch()) {
CF_MDS_RetryRequestFactory cf(mdcache, mdr, false);
int r = mdcache->path_traverse(mdr, cf, mdr->get_filepath(),
(want_auth ? MDS_TRAVERSE_WANT_AUTH : 0),
unsigned delegate_inos_pct = 0;
uint64_t dir_max_entries = 0;
int64_t bal_fragment_size_max = 0;
+ bool allow_batched_ops = true;
double inject_rename_corrupt_dentry_first = 0.0;