From 005767a197875e3862c784122985f7a1ca852203 Mon Sep 17 00:00:00 2001 From: Jinshan Xiong Date: Wed, 31 Jul 2013 12:31:27 -0700 Subject: [PATCH] LU-3676 llite: error setting max_cache_mb at mount time The root cause is that when max_cache_mb conf parameter is applied, the client isn't connected to the OST yet so that sbi->ll_dt_exp is NULL. However, it's not necessary to shrink the cache memory in this case so success should be returned. Signed-off-by: Jinshan Xiong Change-Id: Ib12800812b635207bf4001e2272aadb0ce1e0d6f Reviewed-on: http://review.whamcloud.com/7194 Reviewed-by: Andreas Dilger Reviewed-by: Bobi Jam Tested-by: Hudson Tested-by: Maloo --- lustre/llite/lproc_llite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/llite/lproc_llite.c b/lustre/llite/lproc_llite.c index 2dae8b5..4b86d48 100644 --- a/lustre/llite/lproc_llite.c +++ b/lustre/llite/lproc_llite.c @@ -446,8 +446,8 @@ static int ll_wr_max_cached_mb(struct file *file, const char *buffer, RETURN(-ERANGE); } - if (sbi->ll_dt_exp == NULL) - RETURN(-ENODEV); + if (sbi->ll_dt_exp == NULL) /* being initialized */ + GOTO(out, rc = 0); spin_lock(&sbi->ll_lock); diff = pages_number - cache->ccc_lru_max; -- 1.8.3.1