Skip to content
Snippets Groups Projects
Commit ddfaea52 authored by Bobi Jam's avatar Bobi Jam
Browse files

Branch b1_6

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.
parent e4de0dc2
No related branches found
No related tags found
No related merge requests found
......@@ -284,6 +284,9 @@ static inline int obd_fail_check(__u32 id)
_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
......@@ -352,7 +355,7 @@ do { \
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
......
......@@ -36,7 +36,8 @@ int obd_alloc_fail(const void *ptr, const char *name, const char *type,
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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment