]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc64: sunvdc: skip vdisk response validation upon error
authorJag Raman <jag.raman@oracle.com>
Wed, 21 Jun 2017 15:23:50 +0000 (11:23 -0400)
committerAllen Pais <allen.pais@oracle.com>
Sat, 24 Jun 2017 01:27:49 +0000 (06:57 +0530)
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 <jag.raman@oracle.com>
Reviewed-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
drivers/block/sunvdc.c

index f11e95baaf04f8d9b7ffa97ae86706c3bcb8d9a7..a94b4974014690fa63bafff229bcc38f7785fbcb 100644 (file)
@@ -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);