Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-20123

lock_limit_mb cannot be increased once lowered

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • Lustre 2.18.0
    • 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;
      } 

            skoyama Sohei Koyama
            skoyama Sohei Koyama
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: