[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFA-uR_Zn4MdFKs6U6dqPjuVS60yN4RcYU4jJzjknqy7-RWyEQ@mail.gmail.com>
Date: Wed, 7 Jun 2023 23:55:26 +0800
From: Jianlin Lv <iecedge@...il.com>
To: Bart Van Assche <bvanassche@....org>
Cc: jejb@...ux.ibm.com, martin.petersen@...cle.com, paulmck@...nel.org,
bp@...e.de, peterz@...radead.org, will@...nel.org,
rdunlap@...radead.org, kim.phillips@....com, rostedt@...dmis.org,
wyes.karny@....com, jianlv@...y.com, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, linux-scsi@...r.kernel.org
Subject: Re: [PATCH] scsi: sd: support specify probe type of build-in driver
On Wed, Jun 7, 2023 at 1:38 AM Bart Van Assche <bvanassche@....org> wrote:
>
> On 6/5/23 22:12, Jianlin Lv wrote:
> > In scenarios where SCSI disk name sensitivity is crucial, the probe type
> > of the build-in sd driver can be set to synchronous. As a result,
> > the scsi disk names are deterministic.
>
> Which are these scenarios?
>
> Additionally, how can synchronous scanning of sd devices make a
> difference if there are multiple host bus adapters that use an interface
> type that is scanned asynchronously?
>
> Bart.
The change was prompted by an issue with SCSI devices probing
non-deterministic. On the issue node, there are two types of SCSI hosts:
1. MegaRAID adapters associated with 24 local disks. The disks are named
sequentially as "sda," "sdb," and so on, up to "sdx."
2. STAT controllers associated with the root disk, named "sdy."
Both the MegaRAID adapters and the SATA controller (PCH) are accessed via
the PCIe bus. In theory, depending on their PCIe bus ID in ascending order,
the devices should be initialized in ascending order as well.
However, the SCSI driver currently probes devices asynchronously to allow
for more parallelism.
__driver_attach
->if (driver_allows_async_probing(drv))
async_schedule_dev(__driver_attach_async_helper, dev);
During the probing of SCSI disks attached to MegaRAID, root disk probing
may occur, resulting in a disk naming inconsistency issue.
For example, if root disk probing happens in the middle,it is named "sdq",
The subsequent SCSI disks that are probed will have their names drift,
starting from "sdr" up to "sdy."
For cloud deployment, the local volume provisioner detects and creates PVs
for each local disk (from sda to sdx) on the host, and it cleans up the
disks when they are released.
This requires the logical names of the disks to be deterministic.
Therefore, I have submitted this patch to allow users to configure the
SCSI disk probe type.
If synchronous probing is configured, the SCSI disk probing order is
deterministic and will follow the ascending order of the PCIe bus ID.
Jianlin
Powered by blists - more mailing lists