* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2016, Intel Corporation.
+ * Copyright (c) 2011, 2017, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
int chunk;
int b;
+ if (lut->lut_obd->obd_stopping)
+ /*
+ * in case of failover keep the bit set in order to
+ * avoid overwriting slots in reply_data which might
+ * be required by resent rpcs
+ */
+ return 0;
chunk = idx / LUT_REPLY_SLOTS_PER_CHUNK;
b = idx % LUT_REPLY_SLOTS_PER_CHUNK;
spin_lock_init(&exp->exp_target_data.ted_nodemap_lock);
INIT_LIST_HEAD(&exp->exp_target_data.ted_nodemap_member);
+ spin_lock_init(&exp->exp_target_data.ted_fmd_lock);
+ INIT_LIST_HEAD(&exp->exp_target_data.ted_fmd_list);
OBD_ALLOC_PTR(exp->exp_target_data.ted_lcd);
if (exp->exp_target_data.ted_lcd == NULL)
LASSERT(exp != exp->exp_obd->obd_self_export);
+ tgt_fmd_cleanup(exp);
+
/* free reply data */
mutex_lock(&ted->ted_lcd_lock);
list_for_each_entry_safe(trd, tmp, &ted->ted_reply_list, trd_list) {
RETURN(-EINVAL);
}
- /* Do not erase record for recoverable client. */
- if (exp->exp_obd->obd_fail)
- RETURN(0);
-
/* XXX if lcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
if (!strcmp((char *)ted->ted_lcd->lcd_uuid,
(char *)tgt->lut_obd->obd_uuid.uuid) ||
LBUG();
}
+ /* Do not erase record for recoverable client. */
+ if (exp->exp_flags & OBD_OPT_FAILOVER)
+ RETURN(0);
if (OBD_FAIL_CHECK(OBD_FAIL_TGT_CLIENT_DEL))
RETURN(0);