* [PATCH v4] sparc64: sunvdc: Complete I/O request if vdisk server error
@ 2015-04-10 18:07 chris.hyser
2015-04-10 19:27 ` David Miller
2015-04-10 19:58 ` chris hyser
0 siblings, 2 replies; 3+ messages in thread
From: chris.hyser @ 2015-04-10 18:07 UTC (permalink / raw)
To: sparclinux
sparc64: 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..cfca5bf 100644
--- a/drivers/block/sunvdc.c
+++ b/drivers/block/sunvdc.c
@@ -308,7 +308,12 @@ 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) {
+ if (printk_ratelimit())
+ 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] 3+ messages in thread
* Re: [PATCH v4] sparc64: sunvdc: Complete I/O request if vdisk server error
2015-04-10 18:07 [PATCH v4] sparc64: sunvdc: Complete I/O request if vdisk server error chris.hyser
@ 2015-04-10 19:27 ` David Miller
2015-04-10 19:58 ` chris hyser
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-04-10 19:27 UTC (permalink / raw)
To: sparclinux
From: chris.hyser@oracle.com
Date: Fri, 10 Apr 2015 14:07:34 -0400
> @@ -308,7 +308,12 @@ 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) {
> + if (printk_ratelimit())
> + pr_err(PFX "VIO I/O Error %d\n", desc->status);
Please use pr_err_ratelimited().
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v4] sparc64: sunvdc: Complete I/O request if vdisk server error
2015-04-10 18:07 [PATCH v4] sparc64: sunvdc: Complete I/O request if vdisk server error chris.hyser
2015-04-10 19:27 ` David Miller
@ 2015-04-10 19:58 ` chris hyser
1 sibling, 0 replies; 3+ messages in thread
From: chris hyser @ 2015-04-10 19:58 UTC (permalink / raw)
To: sparclinux
On 4/10/2015 3:27 PM, David Miller wrote:
>> + if (printk_ratelimit())
>> + pr_err(PFX "VIO I/O Error %d\n", desc->status);
>
> Please use pr_err_ratelimited().
No problem.
-chrish
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-04-10 19:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-10 18:07 [PATCH v4] sparc64: sunvdc: Complete I/O request if vdisk server error chris.hyser
2015-04-10 19:27 ` David Miller
2015-04-10 19:58 ` chris hyser
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.