Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4778734pxu; Wed, 21 Oct 2020 05:18:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz41c48I+n4Ckjdm63PW3G5FxlEQJ5jKUG9ubineBXxtBLyN2SDGG7O1HdC2q6+TKaMPyd4 X-Received: by 2002:aa7:c491:: with SMTP id m17mr2695104edq.299.1603282738415; Wed, 21 Oct 2020 05:18:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603282738; cv=none; d=google.com; s=arc-20160816; b=gfwuLblnCuzXOEausWKUGWeODhsUamhQzJkjwMHnxoCqXuW0PjRFR5C43jCOxAVKae ZNlrNqmHimjiBE2zfnmofR2aQiN70IOZ/gkgPPSEJly/7zxSg/5WcVEOEtEa3OA5LNdD /R95c8SFlNNsUZojMQ0BVIlciudt4VbkjJNoJqhL+X/gDV9cWNj0TmZjibpg3h+NBiIM 5+R1AOtTrGobTyZoLYeRv9OfktV7X1PWTgf1qgnjiZCNiR6svrdXcgl5bTa462DvRul0 ZQ/TRTCKMeeBa6uRfpw9LDdudYCrnkcSBjYqu8+aGT1mpSUJ4Wb4xRTbRvQufN0N9lc6 oaOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=zLK0ORafK0KDpva8BzNX2/lsIVw44lu8GrUhiNwTfW8=; b=H/P1zzoQYKJPNgOP3rZn7L+lIEh4DlTJRzZ665pU1j1UYkZs/MFhTSlfQeBWo+wXfT knzPgwNJNs6EOVxeXtC9lwUck68c8zTE1K3dD93/kwpVQ+sSPhq9sPXrxlibrSvyVL2Q HP4s316p3mxbxjIbLYx5rm0V3YFbNPELqvzzujdVcl67+RZ2nuLs1ng3VyQI0VJ6RjJT FkdFmj6jQKj16wJBhQrdD7F4c2NILydo5/a8/0Wk7CwiDNq6wBC7KSHVVUkHpPkWjxnJ TdORuCLdrOSmY5dJvOOKACcjmd5ecxcTcDf4q1yVN35wsTDIZR2OFgDqI1SrDFcbJfWI YjOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f3si1169247eds.476.2020.10.21.05.18.36; Wed, 21 Oct 2020 05:18:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2411612AbgJUDPS (ORCPT + 99 others); Tue, 20 Oct 2020 23:15:18 -0400 Received: from mail-pg1-f169.google.com ([209.85.215.169]:43493 "EHLO mail-pg1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406162AbgJUDPS (ORCPT ); Tue, 20 Oct 2020 23:15:18 -0400 Received: by mail-pg1-f169.google.com with SMTP id r10so584998pgb.10; Tue, 20 Oct 2020 20:15:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zLK0ORafK0KDpva8BzNX2/lsIVw44lu8GrUhiNwTfW8=; b=kxlQCY4nmfmQzjd3W1R6V0BojSYmM2uiqBZHxVyMS/p12vSdT8/yqIv/z7T60kLLNB 0OLUPqp+0HNjJ7iawvZtZldvsGbGkc/I9uaeHCqf69i8r5p04eN8dumAGCIU6wkMdkE6 3RtMs2CpeWYm5MfKtzKxsVLAC0NXn7wRFSFVDLLL5GAdxxwi1CPZxaklf6CgdJYHElpI Gl+zp08rODIleOthIvWqG/4DI4429h3m4J8P6jVejWx2YYbtC/4NEZx0MGpAcg5uHDfj LZJqNFhiVpbUGHHDsa9pbH1jRKuW75M6X3adrxLyWMoaMiNjkeHKkp/ZzFBcoVXoUlZl sbnw== X-Gm-Message-State: AOAM530xlSlDYeBjUx7tixSuE6YZIvCL8olP001/c9sdrf5h6SDPTV8g cvlIXE5H+4muEm4BY1TDK5Mhol6E4oMDyw== X-Received: by 2002:aa7:9a4a:0:b029:155:323e:adae with SMTP id x10-20020aa79a4a0000b0290155323eadaemr1138878pfj.70.1603250117184; Tue, 20 Oct 2020 20:15:17 -0700 (PDT) Received: from [192.168.3.218] (c-73-241-217-19.hsd1.ca.comcast.net. [73.241.217.19]) by smtp.gmail.com with ESMTPSA id m13sm443682pjl.45.2020.10.20.20.15.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Oct 2020 20:15:15 -0700 (PDT) Subject: Re: [PATCH] scsi: ufs: make sure scan sequence for multiple hosts To: Chanho Park , jejb@linux.ibm.com, martin.petersen@oracle.com Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201020070516.129273-1-chanho61.park@samsung.com> From: Bart Van Assche Message-ID: <7fafcc82-2c42-8ef5-14a6-7906b5956363@acm.org> Date: Tue, 20 Oct 2020 20:15:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.2 MIME-Version: 1.0 In-Reply-To: <20201020070516.129273-1-chanho61.park@samsung.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/20/20 12:05 AM, Chanho Park wrote: > By doing scan as asynchronous way, scsi device scannning can be out of > order execution. It is no problem if there is a ufs host but the scsi > device name of each host can be changed according to the scan sequences. > > Ideal Case) host0 scan first > host0 will be started from /dev/sda > -> /dev/sdb (BootLUN0 of host0) > -> /dev/sdc (BootLUN1 of host1) > host1 will be started from /dev/sdd > > This might be an ideal case and we can easily find the host device by > this mappinng. > > However, Abnormal Case) host1 scan first, > host1 will be started from /dev/sda and host0 will be followed later. > > To make sure the scan sequences according to the host, we can use a > bitmap which hosts are scanned and wait until previous hosts are > finished to scan. This sounds completely wrong to me. No code should depend on the order in which LUNs are scanned. Please use the soft links created by udev instead of serializing LUN scanning. Thanks, Bart.