archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <>
To: Phillip Potter <>
Subject: Re: [PATCH v3] drivers/cdrom: improved ioctl for media change detection
Date: Tue, 14 Sep 2021 20:05:41 -0600	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 9/13/21 5:09 PM, Phillip Potter wrote:
> From: Lukas Prediger <>
> The current implementation of the CDROM_MEDIA_CHANGED ioctl relies on
> global state, meaning that only one process can detect a disc change
> while the ioctl call will return 0 for other calling processes afterwards
> (see bug 213267).
> This introduces a new cdrom ioctl, CDROM_TIMED_MEDIA_CHANGE, that
> works by maintaining a timestamp of the last detected disc change instead
> of a boolean flag: Processes calling this ioctl command can provide
> a timestamp of the last disc change known to them and receive
> an indication whether the disc was changed since then and the updated
> timestamp.
> I considered fixing the buggy behavior in the original
> CDROM_MEDIA_CHANGED ioctl but that would require maintaining state
> for each calling process in the kernel, which seems like a worse
> solution than introducing this new ioctl.

Applied for 5.16, thanks.

Jens Axboe

  reply	other threads:[~2021-09-15  2:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 23:09 [PATCH v3] drivers/cdrom: improved ioctl for media change detection Phillip Potter
2021-09-15  2:05 ` Jens Axboe [this message]
2021-09-16 23:07   ` Phillip Potter
  -- strict thread matches above, loose matches on Subject: below --
2021-09-10 21:16 Lukas Prediger
2021-09-10 21:41 ` Randy Dunlap
2021-09-11 11:00   ` Phillip Potter
2021-09-11 17:48     ` Lukas Prediger
2021-09-12 18:04       ` Phillip Potter
2021-09-12 19:12         ` Lukas Prediger
2021-09-13  7:50           ` Phillip Potter
2021-10-06 20:52           ` Randy Dunlap
2021-10-07 23:04             ` Phillip Potter

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).