mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: job jin <jinxiaobo@uniontech.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: jejb@linux.ibm.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: sr: Fix some cdroms automatically ejected when booting into the system
Date: Thu, 5 May 2022 11:01:37 +0800	[thread overview]
Message-ID: <CAEYFbwUBLJg5GEHBxd3xj77XbEwKXWOBV2wBo1AWs0THZCS-+w@mail.gmail.com> (raw)
In-Reply-To: <yq1sfpxkjpo.fsf@ca-mkp.ca.oracle.com>

Hi Martin K. Petersen!

As things stand, we cannot guarantee that all events will be propagated
 to udev. So I think, we don't need to ensure that all events are received
 by udev, we only need to ensure that events after sr probe can be received
 by udev and actively discard events before sr probe.



>
>
> Hi jinxiaobo!
>
> > sr_get_events() has been called before udev starts when SCSI CDROM is
> > built-in and AHCI SATA is bulit-in,so sr events propagated to user
> > space are not handled.  if both is loadable, udev will handle sr
> > events, some cdroms may eject.  We need call sr_get_events() once
> > before device_add_disk() to keep the same result, whether both are
> > built-in or loadable.
>
> I am not sure how calling sr_get_events() and throwing away the result
> ensures that events get propagated to udev. Isn't this just changing
> timing slightly?
>
> --
> Martin K. Petersen      Oracle Linux Engineering
>



      reply	other threads:[~2022-05-05  3:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27  9:09 jinxiaobo
2022-04-28  2:51 ` Martin K. Petersen
2022-05-05  3:01   ` job jin [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=CAEYFbwUBLJg5GEHBxd3xj77XbEwKXWOBV2wBo1AWs0THZCS-+w@mail.gmail.com \
    --to=jinxiaobo@uniontech.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®