Commit 125966db authored by Prasanna Kumar Kalever's avatar Prasanna Kumar Kalever Committed by Martin K. Petersen

scsi: target: tcmu: fix error resetting qfull_time_out to default

Problem:

$ cat /sys/kernel/config/target/core/user_0/block/attrib/qfull_time_out
-1

$ echo "-1" > /sys/kernel/config/target/core/user_0/block/attrib/qfull_time_out
-bash: echo: write error: Invalid argument

Fix:

This patch will help reset qfull_time_out to its default
i.e. qfull_time_out=-1.
Signed-off-by: default avatarPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
Acked-by: default avatarMike Christie <mchristi@redhat.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent fa89adba
...@@ -2121,6 +2121,8 @@ static ssize_t tcmu_qfull_time_out_store(struct config_item *item, ...@@ -2121,6 +2121,8 @@ static ssize_t tcmu_qfull_time_out_store(struct config_item *item,
if (val >= 0) { if (val >= 0) {
udev->qfull_time_out = val * MSEC_PER_SEC; udev->qfull_time_out = val * MSEC_PER_SEC;
} else if (val == -1) {
udev->qfull_time_out = val;
} else { } else {
printk(KERN_ERR "Invalid qfull timeout value %d\n", val); printk(KERN_ERR "Invalid qfull timeout value %d\n", val);
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment