From: Liang Zhen Date: Sun, 29 May 2011 04:04:22 +0000 (+0800) Subject: LU-371 call OBD_ALLOC_LARGE to allocate epp_pools X-Git-Tag: 2.0.64.0~11 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=a36a47b5078e27168260a2f92e0e25ecbcad191a LU-371 call OBD_ALLOC_LARGE to allocate epp_pools enc_pools_alloc is using OBD_ALLOC to allocate memory, which can fail on some systems and return ENOMEM, so we should replace it with OBD_ALLOC_LARGE. Change-Id: I90cfe8c03e6db013818553f34463ecd0edf566ab Signed-off-by: Liang Zhen Reviewed-on: http://review.whamcloud.com/869 Reviewed-by: Andreas Dilger Tested-by: Hudson Reviewed-by: Oleg Drokin --- diff --git a/lustre/ptlrpc/sec_bulk.c b/lustre/ptlrpc/sec_bulk.c index 6fea63f..1fc74d0 100644 --- a/lustre/ptlrpc/sec_bulk.c +++ b/lustre/ptlrpc/sec_bulk.c @@ -691,13 +691,9 @@ EXPORT_SYMBOL(sptlrpc_enc_pool_del_user); static inline void enc_pools_alloc(void) { LASSERT(page_pools.epp_max_pools); - /* - * on system with huge memory but small page size, this might lead to - * high-order allocation. but it's not common, and we suppose memory - * be not too much fragmented at module loading time. - */ - OBD_ALLOC(page_pools.epp_pools, - page_pools.epp_max_pools * sizeof(*page_pools.epp_pools)); + OBD_ALLOC_LARGE(page_pools.epp_pools, + page_pools.epp_max_pools * + sizeof(*page_pools.epp_pools)); } static inline void enc_pools_free(void) @@ -705,8 +701,9 @@ static inline void enc_pools_free(void) LASSERT(page_pools.epp_max_pools); LASSERT(page_pools.epp_pools); - OBD_FREE(page_pools.epp_pools, - page_pools.epp_max_pools * sizeof(*page_pools.epp_pools)); + OBD_FREE_LARGE(page_pools.epp_pools, + page_pools.epp_max_pools * + sizeof(*page_pools.epp_pools)); } int sptlrpc_enc_pool_init(void)