Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1036757AbdDUIgV (ORCPT ); Fri, 21 Apr 2017 04:36:21 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:5380 "EHLO dggrg02-dlp.huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1036133AbdDUIgR (ORCPT ); Fri, 21 Apr 2017 04:36:17 -0400 Subject: Re: [PATCH v2 0/5] Re-order scsi_remove_host and sas_remove_host in SAS HBA LLDDs To: Johannes Thumshirn , "Martin K . Petersen" References: CC: James Bottomley , Christoph Hellwig , Hannes Reinecke , Bart Van Assche , Linux SCSI Mailinglist , Linux Kernel Mailinglist , Jinpu Wang , , , Heyousong , "chenqilin (C)" , "chenqilin (C)" , Linuxarm From: John Garry Message-ID: Date: Fri, 21 Apr 2017 09:34:18 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.203.181.163] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.58F9C454.004A,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: 26a93f63103fbed8b5cea81d8bc9ea02 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2162 Lines: 53 Thanks Johannes. @wangyijing, can you test this patchset please (specifically 3/5)? I know that you have the modified version of libsas which you dabbled with upstreaming. On 21/04/2017 09:04, Johannes Thumshirn wrote: > This series re-orders the calls to scsi_remove_host() and sas_remove_host() in > all SAS HBA drivers (apart from mpt3sas which is doing it correctly). This is > for two reasons: > 1) After the change to recursive removal of sysfs entries, we're > trying to remove already removed kobjects when doing a > sas_remove_host() _after_ a scsi_remove_host() > 2) the documentation mandates it even (becuase of 1) > > Unfortunately this does not completely solve issues with recursive sysfs > removals in SAS, as libsas has asynchronous behaviour where strong ordering > would be needed. But I am working on it and I do know other do as well. So if > anyone else (James, Christoph, Bart, I'm looking at you) has an idea, I do > have test setups and I'm willing to take input in form of ideas and patches. > wangyijing already sent an RFC for fixing this issue (mentioned above), which was a signifiagnt rewrite of some of libsas. I am hoping that he would retry, and that community would support/shepherd this activity, or at least say it will be accepted so effort is not wasted. > I also dropped the SDEV_CANCEL state change for now. We re-evaluate it once we > have an idea how to tackle the ordering issues and place it into > sas_unregister_ha() as per James' comment. > > Thanks, > Johannes Thanks > > Johannes Thumshirn (5): > scsi: isci: remove the SAS host after the SCSI host > aic94xx: remove the SAS host after the SCSI host > scsi: hisi_sas: remove the SAS host after the SCSI host > mvsas: remove the SAS host after the SCSI host > scsi: pm8001: remove the SAS host after the SCSI host > > drivers/scsi/aic94xx/aic94xx_init.c | 7 ++++--- > drivers/scsi/hisi_sas/hisi_sas_main.c | 4 ++-- > drivers/scsi/isci/init.c | 3 ++- > drivers/scsi/mvsas/mv_init.c | 6 ++++-- > drivers/scsi/pm8001/pm8001_init.c | 8 ++++++-- > 5 files changed, 18 insertions(+), 10 deletions(-) >