All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/7] Enhance libsas hotplug feature
@ 2017-12-08  9:42 ` Jason Yan
  0 siblings, 0 replies; 32+ messages in thread
From: Jason Yan @ 2017-12-08  9:42 UTC (permalink / raw)
  To: martin.petersen, jejb
  Cc: linux-scsi, linux-kernel, john.garry, zhaohongjiang, hare,
	dan.j.williams, jthumshirn, Raj.Dinesh, hch, huangdaode,
	chenxiang66, xiyou.wangcong, Jason Yan

Now the libsas hotplug has some issues, Dan Williams report
a similar bug here before
https://www.mail-archive.com/linux-scsi@vger.kernel.org/msg39187.html

The issues we have found
1. if LLDD burst reports lots of phy-up/phy-down sas events, some events
   may lost because a same sas events is pending now, finally libsas topo
   may different the hardware.
2. receive a phy down sas event, libsas call sas_deform_port to remove
   devices, it would first delete the sas port, then put a destruction
   discovery event in a new work, and queue it at the tail of workqueue,
   once the sas port be deleted, its children device will be deleted too,
   when the destruction work start, it will found the target device has
   been removed, and report a sysfs warnning.
3. since a hotplug process will be devided into several works, if a phy up
   sas event insert into phydown works, like
   destruction work  ---> PORTE_BYTES_DMAED (sas_form_port) ---->PHYE_LOSS_OF_SIGNAL
   the hot remove flow would broken by PORTE_BYTES_DMAED event, it's not
   we expected, and issues would occur.

v4->v5: -process only one expander's revalidation in sas_ex_revalidate_domain()
        -notify event PORTE_BROADCAST_RCVD in sas_enable_revalidation()
v3->v4: -use dynamic alloced work and support shutting down the phy if active event reached the threshold
        -use flush_workqueue instead of wait-completion to process discover events synchronously
        -direct call probe and destruct function
v2->v3: some code improvements suggested by Johannes and John,
        split v2 patch 2 into several small pathes.
v1->v2: some code improvements suggested by John Garry

Jason Yan (7):
  scsi: libsas: Use dynamic alloced work to avoid sas event lost
  scsi: libsas: shut down the PHY if events reached the threshold
  scsi: libsas: make the event threshold configurable
  scsi: libsas: Use new workqueue to run sas event and disco event
  scsi: libsas: use flush_workqueue to process disco events
    synchronously
  scsi: libsas: direct call probe and destruct
  scsi: libsas: notify event PORTE_BROADCAST_RCVD in
    sas_enable_revalidation()

 drivers/scsi/hisi_sas/hisi_sas_main.c |   6 ++
 drivers/scsi/libsas/sas_ata.c         |   1 -
 drivers/scsi/libsas/sas_discover.c    |  34 ++++++-----
 drivers/scsi/libsas/sas_event.c       |  86 ++++++++++++++++++++-------
 drivers/scsi/libsas/sas_expander.c    |   8 +--
 drivers/scsi/libsas/sas_init.c        | 107 +++++++++++++++++++++++++++++++++-
 drivers/scsi/libsas/sas_internal.h    |   7 +++
 drivers/scsi/libsas/sas_phy.c         |  69 +++++++++++-----------
 drivers/scsi/libsas/sas_port.c        |  25 ++++----
 include/scsi/libsas.h                 |  30 +++++++---
 include/scsi/scsi_transport_sas.h     |   1 +
 11 files changed, 277 insertions(+), 97 deletions(-)

-- 
2.9.5

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2018-01-08  7:38 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-08  9:42 [PATCH v5 0/7] Enhance libsas hotplug feature Jason Yan
2017-12-08  9:42 ` Jason Yan
2017-12-08  9:42 ` [PATCH v5 1/7] scsi: libsas: Use dynamic alloced work to avoid sas event lost Jason Yan
2017-12-08  9:42   ` Jason Yan
2017-12-15 12:14   ` Hannes Reinecke
2017-12-08  9:42 ` [PATCH v5 2/7] scsi: libsas: shut down the PHY if events reached the threshold Jason Yan
2017-12-08  9:42   ` Jason Yan
2017-12-15 12:18   ` Hannes Reinecke
2018-01-08  7:38     ` Hannes Reinecke
2017-12-08  9:42 ` [PATCH v5 3/7] scsi: libsas: make the event threshold configurable Jason Yan
2017-12-08  9:42   ` Jason Yan
2017-12-08 12:09   ` John Garry
2017-12-08 12:09     ` John Garry
2017-12-15 12:19   ` Hannes Reinecke
2018-01-04 10:04     ` John Garry
2018-01-04 10:04       ` John Garry
2017-12-08  9:42 ` [PATCH v5 4/7] scsi: libsas: Use new workqueue to run sas event and disco event Jason Yan
2017-12-08  9:42   ` Jason Yan
2017-12-15 12:20   ` Hannes Reinecke
2017-12-08  9:42 ` [PATCH v5 5/7] scsi: libsas: use flush_workqueue to process disco events synchronously Jason Yan
2017-12-08  9:42   ` Jason Yan
2017-12-15 12:21   ` Hannes Reinecke
2017-12-08  9:42 ` [PATCH v5 6/7] scsi: libsas: direct call probe and destruct Jason Yan
2017-12-08  9:42   ` Jason Yan
2017-12-15 12:23   ` Hannes Reinecke
2017-12-08  9:42 ` [PATCH v5 7/7] scsi: libsas: notify event PORTE_BROADCAST_RCVD in sas_enable_revalidation() Jason Yan
2017-12-08  9:42   ` Jason Yan
2017-12-15 12:26   ` Hannes Reinecke
2018-01-02 11:06 ` [PATCH v5 0/7] Enhance libsas hotplug feature John Garry
2018-01-02 11:06   ` John Garry
2018-01-04  6:01   ` Martin K. Petersen
2018-01-04  6:01     ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.