From: Phillip Potter <phil@philpotter.co.uk>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH v3] drivers/cdrom: improved ioctl for media change detection
Date: Fri, 17 Sep 2021 00:07:10 +0100 [thread overview]
Message-ID: <YUPOHlMtJwU3r+rG@equinox> (raw)
In-Reply-To: <5766487b-a5b4-9590-3f56-2c1d23819ffa@kernel.dk>
On Tue, Sep 14, 2021 at 08:05:41PM -0600, Jens Axboe wrote:
> On 9/13/21 5:09 PM, Phillip Potter wrote:
> > From: Lukas Prediger <lumip@lumip.de>
> >
> > 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
>
Many thanks Jens.
Regards,
Phil
next prev parent reply other threads:[~2021-09-16 23:07 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
2021-09-16 23:07 ` Phillip Potter [this message]
-- 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:
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=YUPOHlMtJwU3r+rG@equinox \
--to=phil@philpotter.co.uk \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).