-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
3
-
9223372036854775807
Steps to Reproduce:
# On MDS lctl get_param ldlm.lock_limit_mb # 2400 lctl set_param ldlm.lock_limit_mb=50 # OK lctl set_param ldlm.lock_limit_mb=2400 # FAILS: -EINVAL
lock_limit_mb_store() in lustre/ldlm/ldlm_lockd.c contains a bogus validation check that prevents increasing lock_limit_mb once it has been set to a non-zero value:
if (ldlm_lock_limit_mb != 0 && watermark > ldlm_lock_limit_mb) { CERROR("lock_reclaim_threshold_mb must be smaller than lock_limit_mb.\n"); return -EINVAL; }
The check is also redundant. The immediately following validation already correctly ensures lock_limit_mb >= lock_reclaim_threshold_mb:
if (ldlm_reclaim_threshold_mb != 0 && watermark < ldlm_reclaim_threshold_mb) { CERROR("lock_limit_mb must be greater than lock_reclaim_threshold_mb.\n"); return -EINVAL; }