linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/7] Enhance libsas hotplug feature
@ 2017-07-10  7:06 Yijing Wang
  2017-07-10  7:06 ` [PATCH v3 1/7] libsas: Use static sas event pool to appease sas event lost Yijing Wang
                   ` (8 more replies)
  0 siblings, 9 replies; 39+ messages in thread
From: Yijing Wang @ 2017-07-10  7:06 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: chenqilin2, hare, linux-scsi, linux-kernel, chenxiang66,
	huangdaode, wangkefeng.wang, zhaohongjiang, dingtianhong,
	guohanjun, yanaijie, hch, dan.j.williams, emilne, thenzl, wefu,
	charles.chenxin, chenweilong, john.garry, Yijing Wang

This patchset is based Johannes's patch
"scsi: sas: scsi_queue_work can fail, so make callers aware"

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.

The first patch fix the sas events lost, and the second one introudce wait-complete
to fix the hotplug order issues.

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

Yijing Wang (7):
  libsas: Use static sas event pool to appease sas event lost
  libsas: remove unused port_gone_completion
  libsas: Use new workqueue to run sas event
  libsas: add sas event wait-complete support
  libsas: add a new workqueue to run probe/destruct discovery event
  libsas: add wait-complete support to sync discovery event
  libsas: release disco mutex during waiting in sas_ex_discover_end_dev

 drivers/scsi/libsas/sas_discover.c |  58 +++++++---
 drivers/scsi/libsas/sas_event.c    | 212 ++++++++++++++++++++++++++++++++-----
 drivers/scsi/libsas/sas_expander.c |  22 +++-
 drivers/scsi/libsas/sas_init.c     |  21 ++--
 drivers/scsi/libsas/sas_internal.h |  64 +++++++++++
 drivers/scsi/libsas/sas_phy.c      |  48 +++------
 drivers/scsi/libsas/sas_port.c     |  22 ++--
 include/scsi/libsas.h              |  27 +++--
 8 files changed, 373 insertions(+), 101 deletions(-)

-- 
2.5.0

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

end of thread, other threads:[~2017-07-14  8:43 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-10  7:06 [PATCH v3 0/7] Enhance libsas hotplug feature Yijing Wang
2017-07-10  7:06 ` [PATCH v3 1/7] libsas: Use static sas event pool to appease sas event lost Yijing Wang
2017-07-11 15:37   ` John Garry
2017-07-12  2:06     ` wangyijing
2017-07-12  8:17       ` John Garry
2017-07-12  8:47         ` wangyijing
2017-07-12 10:13           ` John Garry
2017-07-13  2:13             ` wangyijing
2017-07-14  6:40   ` Hannes Reinecke
2017-07-10  7:06 ` [PATCH v3 2/7] libsas: remove unused port_gone_completion Yijing Wang
2017-07-11 15:54   ` John Garry
2017-07-12  2:18     ` wangyijing
2017-07-14  6:40   ` Hannes Reinecke
2017-07-10  7:06 ` [PATCH v3 3/7] libsas: Use new workqueue to run sas event Yijing Wang
2017-07-14  6:42   ` Hannes Reinecke
2017-07-10  7:06 ` [PATCH v3 4/7] libsas: add sas event wait-complete support Yijing Wang
2017-07-14  6:51   ` Hannes Reinecke
2017-07-14  7:46     ` wangyijing
2017-07-14  8:42     ` John Garry
2017-07-10  7:06 ` [PATCH v3 5/7] libsas: add a new workqueue to run probe/destruct discovery event Yijing Wang
2017-07-12 16:50   ` John Garry
2017-07-13  2:36     ` wangyijing
2017-07-14  6:52   ` Hannes Reinecke
2017-07-10  7:06 ` [PATCH v3 6/7] libsas: add wait-complete support to sync " Yijing Wang
2017-07-12 13:51   ` John Garry
2017-07-13  2:19     ` wangyijing
2017-07-14  6:53   ` Hannes Reinecke
2017-07-10  7:06 ` [PATCH v3 7/7] libsas: release disco mutex during waiting in sas_ex_discover_end_dev Yijing Wang
2017-07-13 16:10   ` John Garry
2017-07-14  1:44     ` wangyijing
2017-07-14  8:26       ` John Garry
2017-07-14  6:55   ` Hannes Reinecke
2017-07-12  9:59 ` [PATCH v3 0/7] Enhance libsas hotplug feature John Garry
2017-07-12 11:56   ` Johannes Thumshirn
2017-07-13  1:27   ` wangyijing
2017-07-13  1:37   ` wangyijing
2017-07-13  8:08     ` John Garry
2017-07-13  8:38       ` wangyijing
2017-07-14  8:19 ` wangyijing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).