-/* deprecated - just use OBD_FAIL_CHECK */
-#define OBD_FAIL_CHECK_ONCE OBD_FAIL_CHECK
-
-#define OBD_FAIL_RETURN(id, ret) \
-do { \
- if (unlikely(obd_fail_loc && obd_fail_check(id))) { \
- CERROR("*** obd_fail_return=%x rc=%d ***\n", id, ret); \
- RETURN(ret); \
- } \
-} while(0)
-
-#define OBD_FAIL_TIMEOUT(id, secs) \
-({ int _ret_ = 0; \
- if (unlikely(obd_fail_loc && (_ret_ = obd_fail_check(id)))) { \
- CERROR("obd_fail_timeout id %x sleeping for %d secs\n", \
- (id), (secs)); \
- set_current_state(TASK_UNINTERRUPTIBLE); \
- cfs_schedule_timeout(CFS_TASK_UNINT, \
- cfs_time_seconds(secs)); \
- set_current_state(TASK_RUNNING); \
- CERROR("obd_fail_timeout id %x awake\n", (id)); \
- } \
- _ret_; \
-})
-
-#define OBD_FAIL_TIMEOUT_MS(id, ms) \
-({ int _ret_ = 0; \
- if (unlikely(obd_fail_loc && (_ret_ = obd_fail_check(id)))) { \
- CERROR("obd_fail_timeout id %x sleeping for %d ms\n", \
- (id), (ms)); \
- set_current_state(TASK_UNINTERRUPTIBLE); \
- cfs_schedule_timeout(CFS_TASK_UNINT, \
- cfs_time_seconds(ms)/1000); \
- set_current_state(TASK_RUNNING); \
- CERROR("obd_fail_timeout id %x awake\n", (id)); \
- } \
- _ret_; \
-})
+/* If id hit obd_fail_loc, obd_fail_loc |= value and sleep secs */
+#define OBD_FAIL_TIMEOUT_ORSET(id, value, secs) \
+ obd_fail_timeout_set(id, value, secs, OBD_FAIL_LOC_ORSET)