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

Value read from qos_threshold_rr file does not match value written

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.2.0, Lustre 1.8.8
    • Lustre 1.8.6
    • None
    • CentOS 5.6
    • 4866

    Description

      After I change the value of qos_threshold_rr by writing to /proc/fs/lustre/lov/<fsname>-mdtlov/qos_threshold_rr, the value I read back is usually one less than the value I wrote:

      [root]# echo 17 > qos_threshold_rr
      [root]# cat qos_threshold_rr
      16%

      This is not the case for values 0 or 100:

      [root]# echo 100 > qos_threshold_rr
      [root]# cat qos_threshold_rr
      100%
      [root]# echo 0 > qos_threshold_rr
      [root]# cat qos_threshold_rr
      0%

      I realize this is an artifact of the way the value is stored. (Value range 0-100 is converted to 0-256 when written, and then converted back when read.) However, it is confusing to write one value and then read back a different value. This could be especially problematic when the value is 1:

      [root]# echo 1 > qos_threshold_rr
      [root]# cat qos_threshold_rr
      0%

      Anyone reading a value of 0 would not know whether the value had been set to 0 or 1.

      If the behavior of Lustre cannot be modified, then the documentation should probably be updated to explain it.

      Attachments

        Issue Links

          Activity

            People

              adilger Andreas Dilger
              rmohr Rick Mohr
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: