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

mgs: ir_timeout_store() returns 0 on success

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • Lustre 2.18.0
    • None
    • None
    • 3
    • 9223372036854775807

      ir_timeout_store() returns the result of kstrtou64(), which is 0 on success. A sysfs store function must return the number of bytes that it used. Thus a write to mgs.MGS.ir_timeout sets the value, but lctl set_param reports a failure and exits with status 22:

      # lctl set_param mgs.MGS.ir_timeout=7
      error: set_param: setting /sys/fs/lustre/mgs/MGS/ir_timeout=7: wrote only 0
      error: set_param: setting 'mgs/MGS/ir_timeout'='7': Invalid argument
      # lctl get_param mgs.MGS.ir_timeout
      mgs.MGS.ir_timeout=7
      

      A script that checks the exit status of lctl set_param thus fails, although the new value is in effect.

      LU-8066 added the bug when it moved ir_timeout from procfs to sysfs. The fix returns count when kstrtou64() succeeds.

            hornc Chris Horn
            hornc Chris Horn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: