lov.add_xlock(&dn->lock);
} else {
// force client to flush async dir operation if necessary
- if (cur->filelock.is_cached())
+ if (cur->filelock.is_cached() &&
+ !(mdr->lock_cache &&
+ static_cast<const MutationImpl*>(mdr->lock_cache)->is_wrlocked(&cur->filelock))) {
lov.add_wrlock(&cur->filelock);
+ }
lov.add_rdlock(&dn->lock);
}
if (!mds->locker->acquire_locks(mdr, lov)) {
lov.add_xlock(&dn->lock);
} else {
// force client to flush async dir operation if necessary
- if (cur->filelock.is_cached())
+ if (cur->filelock.is_cached() &&
+ !(mdr->lock_cache &&
+ static_cast<const MutationImpl*>(mdr->lock_cache)->is_wrlocked(&cur->filelock))) {
lov.add_wrlock(&cur->filelock);
+ }
lov.add_rdlock(&dn->lock);
}
if (!mds->locker->acquire_locks(mdr, lov)) {
"clog_to_syslog_level", \
"fsid", \
"host", \
+ "mds_allow_async_dirops", \
"mds_alternate_name_max", \
"mds_bal_export_pin", \
"mds_bal_fragment_dirs", \
"mds_session_cap_acquisition_throttle", \
"mds_session_max_caps_throttle_ratio", \
"mds_session_metadata_threshold", \
- "mds_symlink_recovery", \
- "mds_allow_async_dirops"
+ "mds_symlink_recovery"
constexpr bool is_sorted = [] () constexpr {
constexpr auto arr = std::to_array<std::string_view>({KEYS});