From: Jag Raman Date: Wed, 21 Jun 2017 15:23:50 +0000 (-0400) Subject: sparc64: sunvdc: skip vdisk response validation upon error X-Git-Tag: v4.1.12-105.0.20170705_2000~38 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ca0ff2a4e64aaa04366221dc0952f53f87741886;p=users%2Fjedix%2Flinux-maple.git 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 --- 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);