Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753304AbdGNIUf (ORCPT ); Fri, 14 Jul 2017 04:20:35 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2994 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750853AbdGNIUc (ORCPT ); Fri, 14 Jul 2017 04:20:32 -0400 Subject: Re: [PATCH v3 0/7] Enhance libsas hotplug feature To: , References: <1499670369-44143-1-git-send-email-wangyijing@huawei.com> CC: , , , , , , , , , , , , , , , , , , From: wangyijing Message-ID: <59687E80.1080807@huawei.com> Date: Fri, 14 Jul 2017 16:19:12 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1499670369-44143-1-git-send-email-wangyijing@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.177.23.4] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A0B0202.59687EC9.001E,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 29d8939b3b8d47b43d1b6b5b8ca471de Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2898 Lines: 60 Hi, I'm sorry to say that I have to stop the libsas hotplug improvement work, I will resign from Huawei, so I have no time and hardware to continue to work at this issue. John is very familiar with this work, and provide a lot of good suggestions. So if John like, I am glad he could join to work at this issues, And my colleague Jason Yan could also provide helps. Thanks! Yijing. 在 2017/7/10 15:06, 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(-) >