Skip to content
Snippets Groups Projects
Commit 53cedecb authored by Walter Poxon's avatar Walter Poxon
Browse files

bz-13541

parent 45b2213c
No related branches found
No related tags found
No related merge requests found
...@@ -35,8 +35,8 @@ int obd_alloc_fail(const void *ptr, const char *name, const char *type, ...@@ -35,8 +35,8 @@ int obd_alloc_fail(const void *ptr, const char *name, const char *type,
{ {
if (ptr == NULL || if (ptr == NULL ||
(ll_rand() & OBD_ALLOC_FAIL_MASK) < obd_alloc_fail_rate) { (ll_rand() & OBD_ALLOC_FAIL_MASK) < obd_alloc_fail_rate) {
CERROR("%s%salloc of %s (%u bytes) failed at %s:%d\n", CERROR("%s%salloc of %s ("LPU64" bytes) failed at %s:%d\n",
ptr ? "force " :"", type, name, (unsigned int)size, file, ptr ? "force " :"", type, name, (__u64) size, file,
line); line);
CERROR("%d total bytes allocated by Lustre, %d by Portals\n", CERROR("%d total bytes allocated by Lustre, %d by Portals\n",
atomic_read(&obd_memory), atomic_read(&libcfs_kmemory)); atomic_read(&obd_memory), atomic_read(&libcfs_kmemory));
......
...@@ -16,9 +16,11 @@ ...@@ -16,9 +16,11 @@
#ifndef __KERNEL__ #ifndef __KERNEL__
#include <liblustre.h> #include <liblustre.h>
#define get_random_bytes(val, size) (*val) = 0 #define get_random_bytes(val, size) (*val) = 0
#endif #else /* __KERNEL__ */
#include <obd_class.h>
#include <linux/random.h> #include <linux/random.h>
#endif /* __KERNEL__ */
#include <obd_class.h>
/* /*
From: George Marsaglia <geo@stat.fsu.edu> From: George Marsaglia <geo@stat.fsu.edu>
......
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