Add a new helper _set_fs_module_param for setting module param. Signed-off-by: Chengguang Xu <cgxu519@xxxxxxxxxxxx> --- common/module | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/module b/common/module index 39e4e793..148e8c8f 100644 --- a/common/module +++ b/common/module @@ -81,3 +81,12 @@ _get_fs_module_param() { cat /sys/module/${FSTYP}/parameters/${1} 2>/dev/null } + # Set the value of a filesystem module parameter + # at /sys/module/$FSTYP/parameters/$PARAM + # + # Usage example: + # _set_fs_module_param param value + _set_fs_module_param() +{ + echo ${2} > /sys/module/${FSTYP}/parameters/${1} 2>/dev/null +} -- 2.20.1