Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1611746
| From | Johannes Thumshirn <jthumshirn@suse.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] scsi: sas: flush destruct workqueue on device unregister |
| Date | 2017-03-29 11:50 +0200 |
| Message-ID | <tqioO-51x-7@gated-at.bofh.it> (permalink) |
| References | <tqioO-51x-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
In the advent of an SAS device unregister we have to wait for all destruct
works to be done to not accidently delay deletion of a SAS rphy or it's
children to the point when we're removing the SCSI or SAS hosts.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
drivers/scsi/libsas/sas_discover.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c
index 60de662..75b18f1 100644
--- a/drivers/scsi/libsas/sas_discover.c
+++ b/drivers/scsi/libsas/sas_discover.c
@@ -382,9 +382,13 @@ void sas_unregister_dev(struct asd_sas_port *port, struct domain_device *dev)
}
if (!test_and_set_bit(SAS_DEV_DESTROY, &dev->state)) {
+ struct sas_discovery *disc = &dev->port->disc;
+ struct sas_work *sw = &disc->disc_work[DISCE_DESTRUCT].work;
+
sas_rphy_unlink(dev->rphy);
list_move_tail(&dev->disco_list_node, &port->destroy_list);
sas_discover_event(dev->port, DISCE_DESTRUCT);
+ flush_work(&sw->work);
}
}
--
1.8.5.6
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/2] scsi: sas: flush destruct workqueue on device unregister Johannes Thumshirn <jthumshirn@suse.de> - 2017-03-29 11:50 +0200
Re: [PATCH 1/2] scsi: sas: flush destruct workqueue on device unregister John Garry <john.garry@huawei.com> - 2017-03-29 13:20 +0200
Re: [PATCH 1/2] scsi: sas: flush destruct workqueue on device unregister Johannes Thumshirn <jthumshirn@suse.de> - 2017-03-29 13:40 +0200
Re: [PATCH 1/2] scsi: sas: flush destruct workqueue on device unregister John Garry <john.garry@huawei.com> - 2017-03-29 14:00 +0200
Re: [PATCH 1/2] scsi: sas: flush destruct workqueue on device unregister Johannes Thumshirn <jthumshirn@suse.de> - 2017-03-29 14:40 +0200
Re: [PATCH 1/2] scsi: sas: flush destruct workqueue on device unregister Jinpu Wang <jinpu.wang@profitbricks.com> - 2017-03-29 14:40 +0200
Re: [PATCH 1/2] scsi: sas: flush destruct workqueue on device unregister Johannes Thumshirn <jthumshirn@suse.de> - 2017-03-29 14:50 +0200
Re: [PATCH 1/2] scsi: sas: flush destruct workqueue on device unregister Johannes Thumshirn <jthumshirn@suse.de> - 2017-03-29 15:00 +0200
csiph-web