All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] sunvdc: Complete I/O request if vdisk server error
@ 2015-03-30 16:41 chris hyser
  2015-03-30 16:56 ` David Ahern
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: chris hyser @ 2015-03-30 16:41 UTC (permalink / raw)
  To: sparclinux

sunvdc: Complete I/O request if vdisk server error

If virtual disk server returns an I/O with an error and 0 data transferred,
complete the I/O with EIO to ensure initiating process does not hang
indefinitely.

Signed-off-by: Chris Hyser <chris.hyser@oracle.com>

diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c
index 4b911ed..dad85fe 100644
--- a/drivers/block/sunvdc.c
+++ b/drivers/block/sunvdc.c
@@ -308,7 +308,11 @@ static void vdc_end_one(struct vdc_port *port, struct vio_dring_state *dr,

  	rqe->req = NULL;

-	__blk_end_request(req, (desc->status ? -EIO : 0), desc->size);
+	if (desc->status) {
+		pr_err(PFX "VIO I/O Error %d\n", desc->status);
+		__blk_end_request_all(req, -EIO);
+	} else
+		__blk_end_request(req, 0, desc->size);

  	vdc_blk_queue_start(port);
  }



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] sunvdc: Complete I/O request if vdisk server error
  2015-03-30 16:41 [PATCH v3] sunvdc: Complete I/O request if vdisk server error chris hyser
@ 2015-03-30 16:56 ` David Ahern
  2015-03-30 17:05 ` chris hyser
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: David Ahern @ 2015-03-30 16:56 UTC (permalink / raw)
  To: sparclinux

On 3/30/15 10:41 AM, chris hyser wrote:
> diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c
> index 4b911ed..dad85fe 100644
> --- a/drivers/block/sunvdc.c
> +++ b/drivers/block/sunvdc.c
> @@ -308,7 +308,11 @@ static void vdc_end_one(struct vdc_port *port,
> struct vio_dring_state *dr,
>
>       rqe->req = NULL;
>
> -    __blk_end_request(req, (desc->status ? -EIO : 0), desc->size);
> +    if (desc->status) {
> +        pr_err(PFX "VIO I/O Error %d\n", desc->status);

printk_ratelimit()? i.e., any chance these can come out in a flood?


> +        __blk_end_request_all(req, -EIO);
> +    } else
> +        __blk_end_request(req, 0, desc->size);
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] sunvdc: Complete I/O request if vdisk server error
  2015-03-30 16:41 [PATCH v3] sunvdc: Complete I/O request if vdisk server error chris hyser
  2015-03-30 16:56 ` David Ahern
@ 2015-03-30 17:05 ` chris hyser
  2015-03-31 14:52 ` David Miller
  2015-04-08  3:17 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: chris hyser @ 2015-03-30 17:05 UTC (permalink / raw)
  To: sparclinux

If the underlying VDS driver error is not intermittent and callers ignore the error and keep issuing requests or the 
queue is filled, I suppose there could be a flood of messages.

On 3/30/2015 12:56 PM, David Ahern wrote:
> On 3/30/15 10:41 AM, chris hyser wrote:
>> diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c
>> index 4b911ed..dad85fe 100644
>> --- a/drivers/block/sunvdc.c
>> +++ b/drivers/block/sunvdc.c
>> @@ -308,7 +308,11 @@ static void vdc_end_one(struct vdc_port *port,
>> struct vio_dring_state *dr,
>>
>>       rqe->req = NULL;
>>
>> -    __blk_end_request(req, (desc->status ? -EIO : 0), desc->size);
>> +    if (desc->status) {
>> +        pr_err(PFX "VIO I/O Error %d\n", desc->status);
>
> printk_ratelimit()? i.e., any chance these can come out in a flood?
>
>
>> +        __blk_end_request_all(req, -EIO);
>> +    } else
>> +        __blk_end_request(req, 0, desc->size);
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe sparclinux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] sunvdc: Complete I/O request if vdisk server error
  2015-03-30 16:41 [PATCH v3] sunvdc: Complete I/O request if vdisk server error chris hyser
  2015-03-30 16:56 ` David Ahern
  2015-03-30 17:05 ` chris hyser
@ 2015-03-31 14:52 ` David Miller
  2015-04-08  3:17 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2015-03-31 14:52 UTC (permalink / raw)
  To: sparclinux

From: chris hyser <chris.hyser@oracle.com>
Date: Mon, 30 Mar 2015 13:05:46 -0400

> If the underlying VDS driver error is not intermittent and callers
> ignore the error and keep issuing requests or the queue is filled, I
> suppose there could be a flood of messages.

Please do not "top-post".

First provide (only) the most relevant quoted material, then
provide your response underneath.  Not the other way around.

Thank you.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] sunvdc: Complete I/O request if vdisk server error
  2015-03-30 16:41 [PATCH v3] sunvdc: Complete I/O request if vdisk server error chris hyser
                   ` (2 preceding siblings ...)
  2015-03-31 14:52 ` David Miller
@ 2015-04-08  3:17 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2015-04-08  3:17 UTC (permalink / raw)
  To: sparclinux

From: David Ahern <david.ahern@oracle.com>
Date: Mon, 30 Mar 2015 10:56:29 -0600

> On 3/30/15 10:41 AM, chris hyser wrote:
>> diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c
>> index 4b911ed..dad85fe 100644
>> --- a/drivers/block/sunvdc.c
>> +++ b/drivers/block/sunvdc.c
>> @@ -308,7 +308,11 @@ static void vdc_end_one(struct vdc_port *port,
>> struct vio_dring_state *dr,
>>
>>       rqe->req = NULL;
>>
>> -    __blk_end_request(req, (desc->status ? -EIO : 0), desc->size);
>> +    if (desc->status) {
>> +        pr_err(PFX "VIO I/O Error %d\n", desc->status);
> 
> printk_ratelimit()? i.e., any chance these can come out in a flood?

Agreed.  There is no benefit to spamming the logs if a series of I/O
errors occur all in a bunch, especially since the log message doesn't
print out any identifying information about the specific I/O request
that failed.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-08  3:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-30 16:41 [PATCH v3] sunvdc: Complete I/O request if vdisk server error chris hyser
2015-03-30 16:56 ` David Ahern
2015-03-30 17:05 ` chris hyser
2015-03-31 14:52 ` David Miller
2015-04-08  3:17 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.