| 388 | // cons/des |
| 389 | |
| 390 | Client::Client(Messenger *m, MonClient *mc, Objecter *objecter_) |
| 391 | : Dispatcher(m->cct->get()), |
| 392 | timer(m->cct, timer_lock, false), |
| 393 | messenger(m), |
| 394 | monclient(mc), |
| 395 | objecter(objecter_), |
| 396 | whoami(mc->get_global_id()), |
| 397 | mount_state(CLIENT_UNMOUNTED, "Client::mountstate_lock"), |
| 398 | initialize_state(CLIENT_NEW, "Client::initstate_lock"), |
| 399 | cct_deleter{m->cct, [](CephContext *p) {p->put();}}, |
| 400 | async_ino_invalidator(m->cct), |
| 401 | async_dentry_invalidator(m->cct), |
| 402 | interrupt_finisher(m->cct), |
| 403 | remount_finisher(m->cct), |
| 404 | async_ino_releasor(m->cct), |
| 405 | objecter_finisher(m->cct), |
| 406 | m_command_hook(this), |
| 407 | fscid(0), |
| 408 | subvolume_tracker{std::make_unique<SubvolumeMetricTracker>(cct, whoami)} |
| 409 | { |
| 410 | /* We only use the locale for normalization/case folding. That is unaffected |
| 411 | * by the locale but required by the API. |
| 412 | */ |
| 413 | auto generator = boost::locale::generator(); |
| 414 | m_locale = generator("en_US.UTF-8"); |
| 415 | |
| 416 | _reset_faked_inos(); |
| 417 | |
| 418 | user_id = cct->_conf->client_mount_uid; |
| 419 | group_id = cct->_conf->client_mount_gid; |
| 420 | client_permissions = cct->_conf.get_val<bool>("client_permissions"); |
| 421 | fuse_default_permissions = cct->_conf.get_val<bool>( |
| 422 | "fuse_default_permissions"); |
| 423 | |
| 424 | _collect_and_send_global_metrics = cct->_conf.get_val<bool>( |
| 425 | "client_collect_and_send_global_metrics"); |
| 426 | |
| 427 | mount_timeout = cct->_conf.get_val<std::chrono::seconds>( |
| 428 | "client_mount_timeout"); |
| 429 | |
| 430 | caps_release_delay = cct->_conf.get_val<std::chrono::seconds>( |
| 431 | "client_caps_release_delay"); |
| 432 | |
| 433 | injected_write_delay_secs = std::chrono::duration<int>( |
| 434 | cct->_conf.get_val<std::chrono::seconds>("client_inject_write_delay_secs")).count(); |
| 435 | |
| 436 | respect_subvolume_snapshot_visibility = cct->_conf.get_val<bool>( |
| 437 | "client_respect_subvolume_snapshot_visibility"); |
| 438 | |
| 439 | fscrypt_as = cct->_conf.get_val<bool>( |
| 440 | "client_fscrypt_as"); |
| 441 | |
| 442 | if (cct->_conf->client_acl_type == "posix_acl") |
| 443 | acl_type = POSIX_ACL; |
| 444 | |
| 445 | if (auto str = cct->_conf->client_debug_inject_features; !str.empty()) { |
| 446 | myfeatures = feature_bitset_t(str); |
| 447 | } else { |
nothing calls this directly
no test coverage detected