From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754126AbdECSPP (ORCPT ); Wed, 3 May 2017 14:15:15 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:49535 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750737AbdECSPH (ORCPT ); Wed, 3 May 2017 14:15:07 -0400 X-IronPort-AV: E=Sophos;i="5.38,284,1491235200"; d="scan'208";a="15889229" From: Bart Van Assche To: "linux-scsi@vger.kernel.org" , "bergwolf@gmail.com" CC: "jejb@linux.vnet.ibm.com" , "linux-kernel@vger.kernel.org" , "martin.petersen@oracle.com" Subject: Re: [PATCH RFC] scsi: wait sd probing in manual scan Thread-Topic: [PATCH RFC] scsi: wait sd probing in manual scan Thread-Index: AQHSv/Qv9B+Dhefp90KsxM/YWVFV9qHi8nIA Date: Wed, 3 May 2017 18:15:02 +0000 Message-ID: <1493835300.3901.28.camel@sandisk.com> References: <1493365699-25566-1-git-send-email-bergwolf@gmail.com> In-Reply-To: <1493365699-25566-1-git-send-email-bergwolf@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=sandisk.com; x-originating-ip: [63.163.107.100] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR0401MB1534;7:5PmUwv1IVQV6OdqivcFfp/ECJ1BGpxKVkS1q9GoHhP+hDGqmjVDIjnQiL6PQVbwZ/kFsezlZ24M5majcZoMtWMVHoE6seeM8xJnxu4Q/qqyK4np32CpEePJUP8U7Fw3lDmVeHZXGxoMZacN6ltZE4ItVenZvWuuk1wbwJOHZFfi0w/Zt75sb6p0QQNa5xaR2/0jJt3+Xhg9rWOwEv7gkuX7LJ3OUYJ8sdr9pC8/uzN5zR3SW/VKtv36AVq2xVkx9yGN2v9JlW0TYifDZnsKMCdZ956I1Iyy2vhNBQ3AlgIYUYvqN1B8B1Vd39iCnh224jGUwG6vKWve32cC+MuHHdw==;20:91uYmTnpEx2uY/pAwnO3Idz8q5EQsBlXqawOU7CPGU9RXm8J5oHUdbJvgd7IUbzU1lp7rgnAOzrb7cuTmccH3wi1nEiVguT/gj7ZHO6hzyHxUoQ1MkYpDDq9l79/tbt6i1TvGMCdNqVQQnD6tdOU2fuNXw6c3bsgEjpjjjsHbwM= x-ms-office365-filtering-correlation-id: 6eb4ac88-773a-4052-67dc-08d49250513a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081);SRVR:CY1PR0401MB1534; wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123555025)(20161123562025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148);SRVR:CY1PR0401MB1534;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0401MB1534; x-forefront-prvs: 029651C7A1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39840400002)(39850400002)(39400400002)(39410400002)(39450400003)(39860400002)(377424004)(24454002)(305945005)(39060400002)(7736002)(3660700001)(6246003)(229853002)(50986999)(38730400002)(76176999)(5660300001)(3280700002)(54356999)(6512007)(77096006)(66066001)(122556002)(36756003)(6486002)(54906002)(81156014)(8676002)(6506006)(99286003)(81166006)(6436002)(8936002)(6116002)(3846002)(102836003)(478600001)(25786009)(33646002)(189998001)(2501003)(103116003)(53936002)(2900100001)(86362001)(2950100002)(4326008)(2906002);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0401MB1534;H:CY1PR0401MB1536.namprd04.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-ID: <1FCFADC3DCCDA04C80F4BDF7D6F28B89@namprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-originalarrivaltime: 03 May 2017 18:15:02.0622 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0401MB1534 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v43IFVhH002017 On Fri, 2017-04-28 at 15:48 +0800, Peng Tao wrote: > We have a guest init programe trying to mount a device after doing scsi host scan > at boot time. Occasionally it fails to find the device when mounting. After digging > a bit, it seems the root cause is sd async_schedule probing. > > With async probing, there is no guarantee of device readiness when scsi host > scan finishes. However, users do expect to have a valid way to make sure device > is usable. Change scsi scan to wait sd probing in manual scan case so that we > don't leave user with random device state when scsi host scan returns. > > Is this the right way to have such guarantee? Hello Peng, Please fix the guest init program such that it waits until the SCSI device it needs is ready. Thanks, Bart.