LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Lukas Prediger <lumip@lumip.de>
To: axboe@kernel.dk
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/cdrom: improved ioctl for media change detection
Date: Thu, 26 Aug 2021 21:01:19 +0300 [thread overview]
Message-ID: <dc87e72b-4eea-a055-1da9-fe6e6c08a2e3@lumip.de> (raw)
In-Reply-To: <20210805194417.12439-1-lumip@lumip.de>
On 05.08.21 22:44, Lukas Prediger wrote:
> 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.
>
> Signed-off-by: Lukas Prediger <lumip@lumip.de>
> ---
> This is my first patch sent to the kernel and I followed the recommended
> process as closely as I could. If I misstepped somewhere, please let me know.
> I also tried to find a mailing list more specific to the problem but was unable,
> please inform me if there is one where this should be sent instead.
>
> Finally, I wasn't sure whether/how to add my name to the updated docs
> and if I should update the date on them (there have been some recent commits
> that did not result in credits given to the commit author or updating
> the dates in the docs, but those did not add any new content either), so
> info in the most appropriate way would be welcome.
>
> Looking forward to your feedback.
> ---
> Documentation/cdrom/cdrom-standard.rst | 14 +++++-
> Documentation/userspace-api/ioctl/cdrom.rst | 6 ++-
> drivers/cdrom/cdrom.c | 56 +++++++++++++++++++--
> include/linux/cdrom.h | 1 +
> include/uapi/linux/cdrom.h | 15 ++++++
> 5 files changed, 86 insertions(+), 6 deletions(-)
As it has been several weeks and I haven't heard anything at all in response to this,
I'd like to bring this to your attention once more. If something is wrong with it,
please let me know so I can fix it.
- Lukas
next prev parent reply other threads:[~2021-08-26 18:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-05 19:44 Lukas Prediger
2021-08-26 18:01 ` Lukas Prediger [this message]
2021-08-26 22:38 ` Jens Axboe
2021-08-27 17:30 ` Lukas Prediger
2021-08-28 3:18 ` Jens Axboe
2021-08-28 10:27 ` Lukas Prediger
2021-08-28 13:22 ` Jens Axboe
2021-09-06 16:53 ` Lukas Prediger
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=dc87e72b-4eea-a055-1da9-fe6e6c08a2e3@lumip.de \
--to=lumip@lumip.de \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH] drivers/cdrom: improved ioctl for media change detection' \
/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
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).