[lustre-devel] [PATCH 379/622] lustre: ptlrpc: don't reset lru_resize on idle reconnect
James Simmons
jsimmons at infradead.org
Thu Feb 27 13:14:07 PST 2020
From: Andriy Skulysh <c17819 at cray.com>
ptlrpc_disconnect_idle_interpret() clears imp_remote_handle,
so reconnect has pcaa_initial_connect set to 1.
Update only changed ns_connect_flags bits.
Fixes: 4b102da53ad ("lustre: ptlrpc: idle connections can disconnect")
Cray-bug-id: LUS-7471
WC-bug-id: https://jira.whamcloud.com/browse/LU-11518
Lustre-commit: acacc9d9b1d0 ("LU-11518 ptlrpc: don't reset lru_resize on idle reconnect")
Signed-off-by: Andriy Skulysh <c17819 at cray.com>
Reviewed-by: Alexander Boyko <c17825 at cray.com>
Reviewed-by: Andrew Perepechko <c17827 at cray.com>
Reviewed-on: https://review.whamcloud.com/35285
Reviewed-by: Alexandr Boyko <c17825 at cray.com>
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Gu Zheng <gzheng at ddn.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
fs/lustre/ptlrpc/import.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/fs/lustre/ptlrpc/import.c b/fs/lustre/ptlrpc/import.c
index 6f13ec1..f8e15f2 100644
--- a/fs/lustre/ptlrpc/import.c
+++ b/fs/lustre/ptlrpc/import.c
@@ -858,13 +858,17 @@ static int ptlrpc_connect_set_flags(struct obd_import *imp,
* disable lru_resize, etc.
*/
if (old_connect_flags != exp_connect_flags(exp) || init_connect) {
+ struct ldlm_namespace *ns = imp->imp_obd->obd_namespace;
+ u64 changed_flags;
+
+ changed_flags =
+ ns->ns_connect_flags ^ ns->ns_orig_connect_flags;
CDEBUG(D_HA,
"%s: Resetting ns_connect_flags to server flags: %#llx\n",
imp->imp_obd->obd_name, ocd->ocd_connect_flags);
- imp->imp_obd->obd_namespace->ns_connect_flags =
- ocd->ocd_connect_flags;
- imp->imp_obd->obd_namespace->ns_orig_connect_flags =
- ocd->ocd_connect_flags;
+ ns->ns_connect_flags = (ns->ns_connect_flags & changed_flags) |
+ (ocd->ocd_connect_flags & ~changed_flags);
+ ns->ns_orig_connect_flags = ocd->ocd_connect_flags;
}
if (ocd->ocd_connect_flags & OBD_CONNECT_AT)
--
1.8.3.1
More information about the lustre-devel
mailing list