From: Mike Christie <mchristi@redhat.com>
To: target-devel@vger.kernel.org
Subject: Re: [PATCH] tcmu: fix error resetting qfull_time_out to default
Date: Thu, 12 Apr 2018 16:50:14 +0000 [thread overview]
Message-ID: <5ACF8E46.5010403@redhat.com> (raw)
In-Reply-To: <20180409114436.21895-1-prasanna.kalever@redhat.com>
On 04/09/2018 06:44 AM, Prasanna Kumar Kalever wrote:
> 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>
> ---
> drivers/target/target_core_user.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
> index 4ad89ea71a70..4f26bdc3d1dc 100644
> --- a/drivers/target/target_core_user.c
> +++ b/drivers/target/target_core_user.c
> @@ -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;
>
Acked-by: Mike Christie <mchristi@redhat.com>
prev parent reply other threads:[~2018-04-12 16:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-09 11:56 [PATCH] tcmu: fix error resetting qfull_time_out to default Prasanna Kumar Kalever
2018-04-10 9:11 ` Xiubo Li
2018-04-12 16:49 ` Mike Christie
2018-04-12 16:50 ` Mike Christie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5ACF8E46.5010403@redhat.com \
--to=mchristi@redhat.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox