From: Bjorn Helgaas <helgaas@kernel.org>
To: Jiwei Sun <sjiwei@163.com>
Cc: nirmal.patel@linux.intel.com, jonathan.derrick@linux.dev,
paul.m.stillwell.jr@intel.com, lpieralisi@kernel.org,
kw@linux.com, robh@kernel.org, bhelgaas@google.com,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
sunjw10@lenovo.com, ahuang12@lenovo.com
Subject: Re: [PATCH v3] PCI: vmd: Create domain symlink before pci_bus_add_devices()
Date: Thu, 11 Jul 2024 11:12:46 -0500 [thread overview]
Message-ID: <20240711161246.GA285252@bhelgaas> (raw)
In-Reply-To: <db1d3c1d-de04-401e-a03e-a8bc8cce639e@163.com>
On Thu, Jul 11, 2024 at 09:32:46AM +0800, Jiwei Sun wrote:
>
> On 7/11/24 06:16, Bjorn Helgaas wrote:
> > [-cc Pawel, Alexey, Tomasz, which all bounced]
> >
> > On Wed, Jul 10, 2024 at 09:29:25PM +0800, Jiwei Sun wrote:
> >> On 7/10/24 04:59, Bjorn Helgaas wrote:
> >>> [+cc Pawel, Alexey, Tomasz for mdadm history]
> >>> On Wed, Jun 05, 2024 at 08:48:44PM +0800, Jiwei Sun wrote:
> >>>> From: Jiwei Sun <sunjw10@lenovo.com>
> >>>>
> >>>> During booting into the kernel, the following error message appears:
> >>>>
> >>>> (udev-worker)[2149]: nvme1n1: '/sbin/mdadm -I /dev/nvme1n1'(err) 'mdadm: Unable to get real path for '/sys/bus/pci/drivers/vmd/0000:c7:00.5/domain/device''
> >>>> (udev-worker)[2149]: nvme1n1: '/sbin/mdadm -I /dev/nvme1n1'(err) 'mdadm: /dev/nvme1n1 is not attached to Intel(R) RAID controller.'
> >>>> (udev-worker)[2149]: nvme1n1: '/sbin/mdadm -I /dev/nvme1n1'(err) 'mdadm: No OROM/EFI properties for /dev/nvme1n1'
> >>>> (udev-worker)[2149]: nvme1n1: '/sbin/mdadm -I /dev/nvme1n1'(err) 'mdadm: no RAID superblock on /dev/nvme1n1.'
> >>>> (udev-worker)[2149]: nvme1n1: Process '/sbin/mdadm -I /dev/nvme1n1' failed with exit code 1.
> >>>>
> >>>> This symptom prevents the OS from booting successfully.
> >>>
> >>> I guess the root filesystem must be on a RAID device, and it's the
> >>> failure to assemble that RAID device that prevents OS boot? The
> >>> messages are just details about why the assembly failed?
> >>
> >> Yes, you are right, in our test environment, we installed the SLES15SP6
> >> on a VROC RAID 1 device which is set up by two NVME hard drivers. And
> >> there is also a hardware RAID kit on the motherboard with other two NVME
> >> hard drivers.
> >
> > OK, thanks for all the details. What would you think of updating the
> > commit log like this?
>
> Thanks, I think this commit log is clearer than before. Do I need to
> send another v4 patch for the changes?
No need, if you think it's OK, I can update the commit log locally.
> > The vmd driver creates a "domain" symlink in sysfs for each VMD bridge.
> > Previously this symlink was created after pci_bus_add_devices() added
> > devices below the VMD bridge and emitted udev events to announce them to
> > userspace.
> >
> > This led to a race between userspace consumers of the udev events and the
> > kernel creation of the symlink. One such consumer is mdadm, which
> > assembles block devices into a RAID array, and for devices below a VMD
> > bridge, mdadm depends on the "domain" symlink.
> >
> > If mdadm loses the race, it may be unable to assemble a RAID array, which
> > may cause a boot failure or other issues, with complaints like this:
> >
> > ...
> >
> > Create the VMD "domain" symlink before invoking pci_bus_add_devices() to
> > avoid this race.
>
prev parent reply other threads:[~2024-07-11 16:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 12:48 [PATCH v3] PCI: vmd: Create domain symlink before pci_bus_add_devices() Jiwei Sun
2024-06-05 16:57 ` Nirmal Patel
2024-07-06 3:22 ` Krzysztof Wilczyński
2024-07-09 20:59 ` Bjorn Helgaas
2024-07-10 13:29 ` Jiwei Sun
2024-07-10 22:16 ` Bjorn Helgaas
2024-07-11 1:32 ` Jiwei Sun
2024-07-11 16:12 ` Bjorn Helgaas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240711161246.GA285252@bhelgaas \
--to=helgaas@kernel.org \
--cc=ahuang12@lenovo.com \
--cc=bhelgaas@google.com \
--cc=jonathan.derrick@linux.dev \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=nirmal.patel@linux.intel.com \
--cc=paul.m.stillwell.jr@intel.com \
--cc=robh@kernel.org \
--cc=sjiwei@163.com \
--cc=sunjw10@lenovo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.