From 9bd260e24c650653a83c3d2b3979c09d4d60f9a7 Mon Sep 17 00:00:00 2001 From: Alexey Lyashkov Date: Mon, 4 Mar 2013 13:42:22 +0200 Subject: [PATCH] LU-2896 mgs: fix handling non IR targets. non IR targets don't know about extra command as have single "register target" so we need to treat - none command as register new target Xyratex-bug-id: MRP-880 Signed-off-by: Alexey Lyashkov Change-Id: I22a8fd034772c9355d2d56a166fdf3766edec719 Reviewed-on: http://review.whamcloud.com/5574 Tested-by: Hudson Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Tested-by: Maloo --- lustre/mgs/mgs_handler.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lustre/mgs/mgs_handler.c b/lustre/mgs/mgs_handler.c index f71cc48..4086200 100644 --- a/lustre/mgs/mgs_handler.c +++ b/lustre/mgs/mgs_handler.c @@ -310,7 +310,11 @@ static int mgs_handle_target_reg(struct ptlrpc_request *req) mti = req_capsule_client_get(&req->rq_pill, &RMF_MGS_TARGET_INFO); - opc = mti->mti_flags & LDD_F_OPC_MASK; + if (OCD_HAS_FLAG(&req->rq_export->exp_connect_data, IMP_RECOV)) + opc = mti->mti_flags & LDD_F_OPC_MASK; + else + opc = LDD_F_OPC_REG; + if (opc == LDD_F_OPC_READY) { CDEBUG(D_MGS, "fs: %s index: %d is ready to reconnect.\n", mti->mti_fsname, mti->mti_stripe_index); -- 1.8.3.1