linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] libsas: fix issue of swapping or replacing disks
@ 2019-01-30  8:24 Jason Yan
  2019-01-30  8:24 ` [PATCH v2 1/7] scsi: libsas: reset the negotiated_linkrate when phy is down Jason Yan
                   ` (6 more replies)
  0 siblings, 7 replies; 30+ messages in thread
From: Jason Yan @ 2019-01-30  8:24 UTC (permalink / raw)
  To: martin.petersen, jejb
  Cc: linux-scsi, linux-kernel, john.garry, zhaohongjiang, hare,
	dan.j.williams, jthumshirn, hch, huangdaode, chenxiang66,
	xiexiuqi, tj, miaoxie, Jason Yan

The work flow of revalidation now is scanning expander phy by the
sequence of the phy and check if the phy have changed. This will leads
to some issues of swapping disks or replacing a disk with a new one.

This patchset addresses the issues above by these main changes:
1. Let the revalidation first scan all phys, mark all changed phys, then
revalidate in two steps. First check if we need to unregister some devices.
if we need to unregister some devices, tell the upper revalidation that we
need to revalidate again. Second, if no devices need to be unregistered,
discover new devices.
2. For sata disk, checking the ata devices class and id to ensure
the same device after flutter.

v1->v2:
1. Do not raise a new bcast but use a loop in sas_revalidate_domain() to
retry revalidation if we need to revalidate again. So that we can do the 
bcast event processing synchronised to the original event
2. Drop some patches splitted from this patchset:
   https://lkml.org/lkml/2018/9/25/153
3. Drop the SATA PHY connection rate matching patch since John had a better
solution for the device discovery phase.
   https://lkml.org/lkml/2019/1/4/340
4. Re-init negotiated_linkrate when PHY is down.
5. Fix an issue when event in queue reached the limit.

Jason Yan (7):
  scsi: libsas: reset the negotiated_linkrate when phy is down
  scsi: libsas: only clear phy->in_shutdown after shutdown event done
  scsi: libsas: optimize the debug print of the revalidate process
  scsi: libsas: split the replacement of sas disks in two steps
  scsi: libsas: check if the same device when flutter
  scsi: libsas: reset the phy address if discover failed
  scsi: libsas: fix issue of swapping two sas disks

 drivers/ata/libata-core.c          |   3 +-
 drivers/scsi/libsas/sas_ata.c      |  18 +++
 drivers/scsi/libsas/sas_discover.c |  25 ++--
 drivers/scsi/libsas/sas_expander.c | 239 +++++++++++++++++++++++++++----------
 drivers/scsi/libsas/sas_phy.c      |   3 +-
 include/linux/libata.h             |   2 +
 include/scsi/libsas.h              |   6 +-
 7 files changed, 224 insertions(+), 72 deletions(-)

-- 
2.14.4


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

end of thread, other threads:[~2019-02-01  9:34 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-30  8:24 [PATCH v2 0/7] libsas: fix issue of swapping or replacing disks Jason Yan
2019-01-30  8:24 ` [PATCH v2 1/7] scsi: libsas: reset the negotiated_linkrate when phy is down Jason Yan
2019-01-30 13:08   ` John Garry
2019-01-31  1:11     ` Jason Yan
2019-01-31  9:00       ` John Garry
2019-01-30  8:24 ` [PATCH v2 2/7] scsi: libsas: only clear phy->in_shutdown after shutdown event done Jason Yan
2019-01-30 16:26   ` John Garry
2019-01-31  1:13     ` Jason Yan
2019-01-30  8:24 ` [PATCH v2 3/7] scsi: libsas: optimize the debug print of the revalidate process Jason Yan
2019-01-30 16:41   ` John Garry
2019-01-31  1:31     ` Jason Yan
2019-01-31 10:25       ` John Garry
2019-01-30  8:24 ` [PATCH v2 4/7] scsi: libsas: split the replacement of sas disks in two steps Jason Yan
2019-01-30 17:22   ` John Garry
2019-01-31  2:04     ` Jason Yan
2019-01-31 10:29       ` John Garry
2019-01-31 16:38         ` John Garry
2019-02-01  1:58           ` Jason Yan
2019-02-01  9:34             ` John Garry
2019-01-30  8:24 ` [PATCH v2 5/7] scsi: libsas: check if the same device when flutter Jason Yan
2019-01-30  8:24 ` [PATCH v2 6/7] scsi: libsas: reset the phy address if discover failed Jason Yan
2019-01-30 17:36   ` John Garry
2019-01-31  2:13     ` Jason Yan
2019-01-31  9:10       ` John Garry
2019-01-30  8:24 ` [PATCH v2 7/7] scsi: libsas: fix issue of swapping two sas disks Jason Yan
2019-01-30 17:53   ` John Garry
2019-01-31  2:55     ` Jason Yan
2019-01-31 16:34       ` John Garry
2019-02-01  2:04         ` Jason Yan
2019-02-01  9:27           ` John Garry

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).