-
Bug
-
Resolution: Fixed
-
Medium
-
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.