From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751864AbeFDBCA (ORCPT ); Sun, 3 Jun 2018 21:02:00 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8685 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751593AbeFDBB7 (ORCPT ); Sun, 3 Jun 2018 21:01:59 -0400 Subject: Re: [PATCH 4/8] scsi: libsas: trigger a new revalidation to discover the device To: John Garry , , References: <20180529022309.21071-1-yanaijie@huawei.com> <20180529022309.21071-5-yanaijie@huawei.com> <013c5c91-9792-7951-95ed-22daae2e2dbe@huawei.com> <5B109A79.6060907@huawei.com> <6b030b96-9733-f6b5-e8af-d1d488c52fb4@huawei.com> CC: , , , , , , , , , , , , Ewan Milne , Tomas Henzl From: Jason Yan Message-ID: <5B148F72.3000000@huawei.com> Date: Mon, 4 Jun 2018 09:01:38 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <6b030b96-9733-f6b5-e8af-d1d488c52fb4@huawei.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.96.203] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/6/1 18:02, John Garry wrote: > I mean that since libsas does disocovery/revalidation for all expander > PHYS for a single event, than all discovery/revalidation should be > synchronised with that same event. I don't mean that for a given > expander PHY which originated a broadcast event, the > revalidation/discovery for that PHY should be synchronised with that > same event. Like you said, I don't think it's possible. > > On another point, one of the reasons to synchronise event processing was > so events are not lost and are processed in order. In principle, by > chaining these bcast events we lose that, since other PHY events may be > queued before we queue the new artificial bcast events. > I got what you mean. I will try to keep the principle of synchronised event processing. >> >> But if you mean we shall do this device removing and rediscovering in >> one revalidation if it is not a "flutter", I think we can wrap a new >> function for sas_revalidate_domain(), such as: >> >> >> while (need_to_revalidate_again) >> need_to_revalidate_again = sas_revalidate_domain() >> >> In this way the sas_port adding/removing is packed in one loop, we won't >> have the annoyance of "duplicate filename" warning. What do you >> think? > > Something like that, where all the discovery/revalidation and related > device + port processing is done before we complete the revalidation > event processing. A single revalidation event may defer do device+port > processing multiple times.