Skip to content

Commit

Permalink
scsi: target: tcmu: fix error resetting qfull_time_out to default
Browse files Browse the repository at this point in the history
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: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Acked-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Prasanna Kumar Kalever authored and Martin K. Petersen committed May 15, 2018
1 parent fa89adb commit 125966d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/target/target_core_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -2121,6 +2121,8 @@ static ssize_t tcmu_qfull_time_out_store(struct config_item *item,

if (val >= 0) {
udev->qfull_time_out = val * MSEC_PER_SEC;
} else if (val == -1) {
udev->qfull_time_out = val;
} else {
printk(KERN_ERR "Invalid qfull timeout value %d\n", val);
return -EINVAL;
Expand Down

0 comments on commit 125966d

Please sign in to comment.