@@ -524,6 +524,7 @@
/* 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)
+#define OBD_FILE_CHECK_QUIET(id) CFS_FILE_CHECK_QUIET(id)
#define OBD_FAIL_CHECK_VALUE(id, value) CFS_FAIL_CHECK_VALUE(id, value)
#define OBD_FAIL_CHECK_ORSET(id, value) CFS_FAIL_CHECK_ORSET(id, value)
#define OBD_FAIL_CHECK_RESET(id, value) CFS_FAIL_CHECK_RESET(id, value)
@@ -87,15 +87,15 @@ static inline bool CFS_FAIL_PRECHECK(u32 id)
(cfs_fail_loc & id & CFS_FAULT));
}
-static inline int cfs_fail_check_set(u32 id, u32 value,
- int set, int quiet)
+static inline int cfs_fail_check_set(u32 id, u32 value, int set, int quiet)
{
+ unsigned long failed_once = cfs_fail_loc & CFS_FAILED; /* ok if racy */
int ret = 0;
if (unlikely(CFS_FAIL_PRECHECK(id))) {
ret = __cfs_fail_check_set(id, value, set);
if (ret) {
- if (quiet) {
+ if (quiet && failed_once) {
CDEBUG(D_INFO, "*** cfs_fail_loc=%x, val=%u***\n",
id, value);
} else {