From ca0ff2a4e64aaa04366221dc0952f53f87741886 Mon Sep 17 00:00:00 2001 From: Jag Raman Date: Wed, 21 Jun 2017 11:23:50 -0400 Subject: [PATCH] sparc64: sunvdc: skip vdisk response validation upon error Skip validating the vdisk IO response from vdisk server, if IO request has failed. sunvdc checks if the size of the request processed by the server matches with the size of request sent by vdc. This is to ensure that partial IO completions are caught, since it's not expected. In the case where the server reports an error, it could set the size of IO processed to zero. Therefore, validating the size of request processed in the case of an error could mis-classify the problem. Orabug: 26242270 Signed-off-by: Jagannathan Raman Reviewed-by: Bijan Mottahedeh Reviewed-by: Liam Merwick Signed-off-by: Allen Pais --- drivers/block/sunvdc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c index f11e95baaf04..a94b49740146 100644 --- a/drivers/block/sunvdc.c +++ b/drivers/block/sunvdc.c @@ -346,7 +346,10 @@ static void vdc_end_one(struct vdc_port *port, struct vio_dring_state *dr, return; } - if (rqe->size != desc->size) { + /* Check for partial IO completion. Not applicable if error + * occurred on server + */ + if (!err && (rqe->size != desc->size)) { pr_err("%s idx=%u err=%d state=%d size=%lld rsize=%lld\n", __func__, index, err, desc->hdr.state, desc->size, rqe->size); -- 2.50.1