Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1665518

[PATCH v2 0/2] Enhance libsas hotplug feature

From Yijing Wang <wangyijing@huawei.com>
Newsgroups linux.kernel
Subject [PATCH v2 0/2] Enhance libsas hotplug feature
Date 2017-06-14 09:40 +0200
Message-ID <tSb4e-2hd-17@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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.

v1->v2: some code improvements suggested by John Garry

Yijing Wang (2):
  libsas: Don't process sas events in static works
  libsas: Enhance libsas hotplug

 drivers/scsi/libsas/sas_discover.c | 58 +++++++++++++++++-------
 drivers/scsi/libsas/sas_event.c    | 90 ++++++++++++++++++++++++++------------
 drivers/scsi/libsas/sas_expander.c |  9 +++-
 drivers/scsi/libsas/sas_init.c     | 29 +++++++++---
 drivers/scsi/libsas/sas_internal.h | 64 +++++++++++++++++++++++++++
 drivers/scsi/libsas/sas_phy.c      | 45 ++++---------------
 drivers/scsi/libsas/sas_port.c     | 22 +++++-----
 include/scsi/libsas.h              | 19 ++++----
 8 files changed, 232 insertions(+), 104 deletions(-)

-- 
2.5.0

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/2] Enhance libsas hotplug feature Yijing Wang <wangyijing@huawei.com> - 2017-06-14 09:40 +0200
  [PATCH v2 1/2] libsas: Don't process sas events in static works Yijing Wang <wangyijing@huawei.com> - 2017-06-14 09:40 +0200
    Re: [PATCH v2 1/2] libsas: Don't process sas events in static works Johannes Thumshirn <jthumshirn@suse.de> - 2017-06-14 11:00 +0200
      Re: [PATCH v2 1/2] libsas: Don't process sas events in static works wangyijing <wangyijing@huawei.com> - 2017-06-14 11:10 +0200
        Re: [PATCH v2 1/2] libsas: Don't process sas events in static works Johannes Thumshirn <jthumshirn@suse.de> - 2017-06-14 11:30 +0200
          Re: [PATCH v2 1/2] libsas: Don't process sas events in static works wangyijing <wangyijing@huawei.com> - 2017-06-14 11:40 +0200
        Re: [PATCH v2 1/2] libsas: Don't process sas events in static works John Garry <john.garry@huawei.com> - 2017-06-14 15:10 +0200
          Re: [PATCH v2 1/2] libsas: Don't process sas events in static works wangyijing <wangyijing@huawei.com> - 2017-06-15 09:50 +0200
            Re: [PATCH v2 1/2] libsas: Don't process sas events in static works John Garry <john.garry@huawei.com> - 2017-06-15 10:10 +0200
              Re: [PATCH v2 1/2] libsas: Don't process sas events in static works wangyijing <wangyijing@huawei.com> - 2017-06-15 10:30 +0200
  [PATCH v2 2/2] libsas: Enhance libsas hotplug Yijing Wang <wangyijing@huawei.com> - 2017-06-14 09:40 +0200
    Re: [PATCH v2 2/2] libsas: Enhance libsas hotplug Johannes Thumshirn <jthumshirn@suse.de> - 2017-06-14 11:00 +0200
      Re: [PATCH v2 2/2] libsas: Enhance libsas hotplug wangyijing <wangyijing@huawei.com> - 2017-06-14 11:20 +0200

csiph-web