b=12211
i=green, johann
suppress every allocation attempt message noise, and shut off a compile
warning on x86_64 in obd_alloc_fail(), due to size_t being unsigned long
there.
_ret_; \
})
+#define OBD_FAIL_CHECK_QUIET(id) \
+ (unlikely(obd_fail_loc) ? obd_fail_check(id) : 0)
+
/* deprecated - just use OBD_FAIL_CHECK */
#define OBD_FAIL_CHECK_ONCE OBD_FAIL_CHECK
extern atomic_t libcfs_kmemory;
#ifdef RANDOM_FAIL_ALLOC
-#define HAS_FAIL_ALLOC_FLAG OBD_FAIL_CHECK(OBD_FAIL_GENERAL_ALLOC)
+#define HAS_FAIL_ALLOC_FLAG OBD_FAIL_CHECK_QUIET(OBD_FAIL_GENERAL_ALLOC)
#else
#define HAS_FAIL_ALLOC_FLAG 0
#endif
if (ptr == NULL ||
(ll_rand() & OBD_ALLOC_FAIL_MASK) < obd_alloc_fail_rate) {
CERROR("%s%salloc of %s (%u bytes) failed at %s:%d\n",
- ptr ? "force " :"", type, name, size, file, line);
+ ptr ? "force " :"", type, name, (unsigned int)size, file,
+ line);
CERROR("%d total bytes allocated by Lustre, %d by Portals\n",
atomic_read(&obd_memory), atomic_read(&libcfs_kmemory));
return 1;