From: Jinshan Xiong Date: Wed, 31 Jul 2013 19:31:27 +0000 (-0700) Subject: LU-3676 llite: error setting max_cache_mb at mount time X-Git-Tag: 2.4.93~43 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=005767a197875e3862c784122985f7a1ca852203 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 --- 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;