X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Flvfs%2Flvfs_lib.c;h=31c2d512fa6bca9bd5c7a1bbb7bd3d022818a533;hp=82e930bc6196e01f34e3c621c33dcda6435b8c82;hb=21ec386df7314348e9d483008648524192b51054;hpb=cb3ee73eb6120ec15fb2535f7ead943b539629ed diff --git a/lustre/lvfs/lvfs_lib.c b/lustre/lvfs/lvfs_lib.c index 82e930b..31c2d51 100644 --- a/lustre/lvfs/lvfs_lib.c +++ b/lustre/lvfs/lvfs_lib.c @@ -47,29 +47,6 @@ #include #include -unsigned int obd_alloc_fail_rate = 0; - -int obd_alloc_fail(const void *ptr, const char *name, const char *type, - size_t size, const char *file, int line) -{ - if (ptr == NULL || - (cfs_rand() & OBD_ALLOC_FAIL_MASK) < obd_alloc_fail_rate) { - CERROR("%s%salloc of %s ("LPU64" bytes) failed at %s:%d\n", - ptr ? "force " :"", type, name, (__u64)size, file, - line); - CERROR(LPU64" total bytes and "LPU64" total pages " - "("LPU64" bytes) allocated by Lustre, " - "%d total bytes by LNET\n", - obd_memory_sum(), - obd_pages_sum() << CFS_PAGE_SHIFT, - obd_pages_sum(), - cfs_atomic_read(&libcfs_kmemory)); - return 1; - } - return 0; -} -EXPORT_SYMBOL(obd_alloc_fail); - #ifdef LPROCFS void lprocfs_counter_add(struct lprocfs_stats *stats, int idx, long amount) { @@ -198,5 +175,3 @@ int lprocfs_stats_alloc_one(struct lprocfs_stats *stats, unsigned int cpuid) } EXPORT_SYMBOL(lprocfs_stats_alloc_one); #endif /* LPROCFS */ - -EXPORT_SYMBOL(obd_alloc_fail_rate);