Skip to contentSkip to conversation

sunvdc: Complete I/O request if vdisk server error

PATCH Superseded chris hyser 3 participants 5 messages Mar 30, 2015 – Apr 8, 2015 Block layer

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 sunvdc: Complete I/O request if vdisk server error

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.

drivers/block/sunvdc.c +5 -1
index 4b911ed..dad85fe 100644
@@ -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);
  }
#1 lore raw

drivers/block/sunvdc.c static void vdc_end_one(struct vdc_port *port, · line 313

Quoted 12 lines · chris hyser
drivers/block/sunvdc.c +2 -1
index 4b911ed..dad85fe 100644
@@ -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?

Quoted 4 lines
drivers/block/sunvdc.c +3 -0
+        __blk_end_request_all(req, -EIO);
+    } else
+        __blk_end_request(req, 0, desc->size);
 
#2 lore raw
In reply to chris hyser

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.

Quoted 26 lines · David Ahern

drivers/block/sunvdc.c static void vdc_end_one(struct vdc_port *port, · line 313

Quoted 12 lines · chris hyser
drivers/block/sunvdc.c +2 -1
index 4b911ed..dad85fe 100644
@@ -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?

drivers/block/sunvdc.c static void vdc_end_one(struct vdc_port *port, struct vio_dring_state *dr, · line 316

Quoted 4 lines
drivers/block/sunvdc.c +3 -0
+        __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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
In reply to chris hyser

From: chris hyser <[email protected]>
Date: Mon, 30 Mar 2015 13:05:46 -0400

Quoted 3 lines

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.

#4 lore raw
In reply to chris hyser

From: David Ahern <[email protected]>
Date: Mon, 30 Mar 2015 10:56:29 -0600

Quoted 8 lines · chris hyser
Quoted 7 lines
drivers/block/sunvdc.c +0 -0
index 4b911ed..dad85fe 100644
@@ -308,7 +308,11 @@ static void vdc_end_one(struct vdc_port *port,
 struct vio_dring_state *dr,
 
Quoted 7 lines

drivers/block/sunvdc.c static void vdc_end_one(struct vdc_port *port, struct vio_dring_state *dr, · line 312

Quoted 5 lines
drivers/block/sunvdc.c +2 -1
      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.