]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc64: prevent sunvdc from sending duplicate vdisk requests
authorJag Raman <jag.raman@oracle.com>
Tue, 2 May 2017 19:49:34 +0000 (15:49 -0400)
committerShannon Nelson <shannon.nelson@oracle.com>
Wed, 31 May 2017 23:43:50 +0000 (16:43 -0700)
prevent sunvdc from sending duplicate vdisk requests by ensuring that
inflight vdisk requests are resent before waking up suspended vdisk
threads

Orabug: 25866770

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
drivers/block/sunvdc.c

index 1e2c2f791681ee4a01dc8f33e1d7c19b3f43bc87..f11e95baaf04f8d9b7ffa97ae86706c3bcb8d9a7 100644 (file)
@@ -95,6 +95,7 @@ static void vdc_ldc_reset_work(struct work_struct *work);
 static void vdc_ldc_reset_timer(unsigned long _arg);
 static struct bio *vdc_desc_put(struct vdc_port *port, unsigned int idx);
 static inline void vdc_desc_set_state(struct vio_disk_desc *, int);
+static void vdc_resend_inflight(struct vdc_port *port);
 
 static inline struct vdc_port *to_vdc_port(struct vio_driver_state *vio)
 {
@@ -186,6 +187,7 @@ static void vdc_handshake_complete(struct vio_driver_state *vio)
        struct vdc_port *port = to_vdc_port(vio);
 
        del_timer(&port->ldc_reset_timer);
+       vdc_resend_inflight(port);
        vdc_finish(&port->cmp_hs, 0, WAITING_FOR_LINK_UP);
 }
 
@@ -1337,8 +1339,6 @@ static void vdc_ldc_reset(struct vdc_port *port)
        if (err)
                pr_err(PFX "%s vdc_port_up() failed, err=%d\n",
                       port->disk_name, err);
-       else
-               vdc_resend_inflight(port);
 
        if (port->ldc_timeout)
                mod_timer(&port->ldc_reset_timer,