@@ -487,6 +487,7 @@
#define OBD_FAIL_FLR_LV_INC 0x1A02
#define OBD_FAIL_FLR_RANDOM_PICK_MIRROR 0x1A03
+/* LNet is allocated failure locations 0xe000 to 0xffff */
/* Assign references to moved code to reduce code changes */
#define OBD_FAIL_PRECHECK(id) CFS_FAIL_PRECHECK(id)
#define OBD_FAIL_CHECK(id) CFS_FAIL_CHECK(id)
@@ -54,6 +54,12 @@ enum {
CFS_FAIL_LOC_VALUE = 3
};
+/* Failure ranges
+ * "0x0100 - 0x3fff" for Lustre
+ * "0xe000 - 0xefff" for LNet
+ * "0xf000 - 0xffff" for LNDs
+ */
+
/* Failure injection control */
#define CFS_FAIL_MASK_SYS 0x0000FF00
#define CFS_FAIL_MASK_LOC (0x000000FF | CFS_FAIL_MASK_SYS)
@@ -49,6 +49,9 @@
#include <uapi/linux/lnet/lnetctl.h>
#include <uapi/linux/lnet/nidstr.h>
+/* LNET has 0xeXXX */
+#define CFS_FAIL_PTLRPC_OST_BULK_CB2 0xe000
+
extern struct lnet the_lnet; /* THE network */
#if (BITS_PER_LONG == 32)
@@ -4323,7 +4323,11 @@ void lnet_monitor_thr_stop(void)
if (ack == LNET_ACK_REQ)
lnet_attach_rsp_tracker(rspt, cpt, md, mdh);
- rc = lnet_send(self, msg, LNET_NID_ANY);
+ if (CFS_FAIL_CHECK_ORSET(CFS_FAIL_PTLRPC_OST_BULK_CB2,
+ CFS_FAIL_ONCE))
+ rc = -EIO;
+ else
+ rc = lnet_send(self, msg, LNET_NID_ANY);
if (rc) {
CNETERR("Error sending PUT to %s: %d\n",
libcfs_id2str(target), rc);