From: Sebastien Buisson Date: Thu, 12 Dec 2013 17:37:51 +0000 (+0100) Subject: LU-4379 procfs: dont always check max_pages_per_rpc alignement X-Git-Tag: 2.5.53~17 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F58%2F8558%2F3;p=fs%2Flustre-release.git LU-4379 procfs: dont always check max_pages_per_rpc alignement If connection is not established yet, cli->cl_chunkbits is uninitilized so we cannot use it to check max_pages_per_rpc alignment. Signed-off-by: Sebastien Buisson Change-Id: I4c782e2eeb5a2757d79194ee6ab6bff831a283fc Reviewed-on: http://review.whamcloud.com/8558 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Bob Glossman Reviewed-by: Emoly Liu --- diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 7c4bbb7..47279ba 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -400,6 +400,10 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg) cli->cl_max_pages_per_rpc = min_t(int, PTLRPC_MAX_BRW_PAGES, LNET_MTU >> PAGE_CACHE_SHIFT); + /* set cl_chunkbits default value to PAGE_CACHE_SHIFT, + * it will be updated at OSC connection time. */ + cli->cl_chunkbits = PAGE_CACHE_SHIFT; + if (!strcmp(name, LUSTRE_MDC_NAME)) { cli->cl_max_rpcs_in_flight = MDC_MAX_RIF_DEFAULT; } else if (totalram_pages >> (20 - PAGE_CACHE_SHIFT) <= 128 /* MB */) {