* [PATCH] sparc64: sunvdc: Complete I/O request if vdisk server error
@ 2014-11-19 23:52 chris hyser
2014-11-21 19:51 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: chris hyser @ 2014-11-19 23:52 UTC (permalink / raw)
To: sparclinux
Hi All,
In vdc_end_one() of sunvdc.c a non-zero status indicates an error from Solaris
vds. In the case of an actual disk as the vds backend, the error comes from the
corresponding Solaris driver and may or may not represent an actual vdisk error
and the I/O size may be 0. In this case __blk_end_request() does not complete
the request and there may be no further actions to complete it. This results
in an indefinite hang of the process initiating the I/O.
with patch:
chrish2> dd if=/dev/zero of=/dev/vdiskc count=1
sunvdc: virtual disk server I/O error 5
end_request: I/O error, dev vdiskc, sector 0
Buffer I/O error on device vdiskc, logical block 0
lost page write due to I/O error on vdiskc
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.000695392 s, 736 kB/s
Without this patch, dd will hang and cannot be killed. Note, 5 is a Solaris EIO.
Still not sure what that is about. :-(
-chrish
-- >8 --
From 018ad8a7087a195f082dfdc2ae53288eae4a7487 Mon Sep 17 00:00:00 2001
From: chris hyser <chris.hyser@oracle.com>
Date: Wed, 19 Nov 2014 12:41:56 -0800
Subject: [PATCH] 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 0ebadf9..17e9a50 100644
--- a/drivers/block/sunvdc.c
+++ b/drivers/block/sunvdc.c
@@ -279,7 +279,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 && desc->size = 0) {
+ printk(KERN_ERR PFX "virtual disk server I/O error %d\n",
+ desc->status);
+ __blk_end_request_all(req, -EIO);
+ } else
+ __blk_end_request(req, (desc->status ? -EIO : 0) , desc->size);
/* restart blk queue when ring is half emptied */
if (blk_queue_stopped(port->disk->queue) &&
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sparc64: sunvdc: Complete I/O request if vdisk server error
2014-11-19 23:52 [PATCH] sparc64: sunvdc: Complete I/O request if vdisk server error chris hyser
@ 2014-11-21 19:51 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-11-21 19:51 UTC (permalink / raw)
To: sparclinux
From: chris hyser <chris.hyser@oracle.com>
Date: Wed, 19 Nov 2014 18:52:34 -0500
> In vdc_end_one() of sunvdc.c a non-zero status indicates an error from
> Solaris
> vds. In the case of an actual disk as the vds backend, the error comes
> from the
In plain text, this looks terrible.
Please properly format your commit message body to ~80 columns, but
don't do it in a way where you get a full line of text, then a line
with a few words, then another full line of text.
Look at the plain ascii representation of the result and think about
what that will look like to other people trying to read it. Don't
assume some GUI will magically fix the formatting for you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-21 19:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-19 23:52 [PATCH] sparc64: sunvdc: Complete I/O request if vdisk server error chris hyser
2014-11-21 19:51 ` 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.