]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc64: do not dequeue stale VDS IO work entries
authorJag Raman <jag.raman@oracle.com>
Wed, 22 Mar 2017 19:36:01 +0000 (15:36 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 24 Apr 2017 04:43:22 +0000 (21:43 -0700)
This change ensures that stale (ones that are marked to be dropped) VDS IO
work entries are not dequeued.

Orabug: 25455138

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Reviewed-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Reviewed-by: Jack Schwartz <jack.schwartz@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
drivers/block/vds/vds_io.c

index 1315cb5fb6cd2cc0b7b457cea57d94c141910aac..b0e397c31e36ea70a4cb98b47e830f516a42b759 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * vds_io.c: LDOM Virtual Disk Server.
  *
- * Copyright (C) 2014, 2016 Oracle. All rights reserved.
+ * Copyright (C) 2014, 2017 Oracle. All rights reserved.
  */
 
 #include "vds.h"
@@ -232,6 +232,9 @@ void vds_io_done(struct vds_io *io)
         * kernel workqueue AFTER the reset will execute but no response
         * will be sent to the client.
         *
+        * If the request is part of a previously discarded IO queue, do
+        * not try dequeue it, but just drop it instead.
+        *
         * The reset can be initiated by an explicit incoming request
         * or while processing an IO request.  Wakeup anyone waiting on
         * the IO list in either case.
@@ -243,7 +246,10 @@ void vds_io_done(struct vds_io *io)
         * will resend all requests for which it has received no response.
         */
        vds_vio_lock(vio, flags);
-       list_del(&io->list);
+
+       if (!(io->flags & VDS_IO_DROP))
+               list_del(&io->list);
+
        if (io->flags & VDS_IO_FINI) {
                list_for_each_safe(pos, tmp, &port->io_list) {
                        ent = list_entry(pos, struct vds_io, list);