From: Keith Busch <kbusch@kernel.org>
To: Lennart Poettering <mzxreary@0pointer.de>
Cc: Christoph Hellwig <hch@lst.de>,
Linux regressions mailing list <regressions@lists.linux.dev>,
linux-block@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Jens Axboe <axboe@kernel.dk>
Subject: Re: API break, sysfs "capability" file
Date: Tue, 16 Apr 2024 08:44:55 -0600 [thread overview]
Message-ID: <Zh6O5zTBs5JtV4D2@kbusch-mbp> (raw)
In-Reply-To: <Zh6J75OrcMY3dAjY@gardel-login>
On Tue, Apr 16, 2024 at 04:23:43PM +0200, Lennart Poettering wrote:
> On Di, 09.04.24 16:15, Christoph Hellwig (hch@lst.de) wrote:
> 11;rgb:1717/1414/2121
> > On Tue, Apr 09, 2024 at 10:19:09AM +0200, Lennart Poettering wrote:
> > > All I am looking for is a very simple test that returns me a boolean:
> > > is there kernel-level partition scanning enabled on this device or
> > > not.
> >
> > And we can add a trivial sysfs attribute for that.
> >
> > > At this point it's not clear to me if I can write this at all in
> > > a way that works reasonably correctly on any kernel since let's say
> > > 4.15 (which is systemd's "recommended baseline" right now).
> > >
> > > I am really not sure how to salvage this mess at all. AFAICS there's
> > > currently no way to write such a test correctly.
> >
> > You can't. Maybe that's a lesson to not depend on undocumented internal
> > flags exposed by accident by a weirdo interface. Just talk to
> > people.
>
> Undocumented? Internal?
>
> It's was actually one of the *best* documented kernel *public* APIs I
> ever came across:
>
> https://www.kernel.org/doc/html/v5.16/block/capability.html
>
> So much detail, I love it!
>
> I mean, you did good work here, documented it, with all flags in all
> details. I think that's great work! You should take pride in this, not
> try to deny its existance!
The patch that introduced this was submitted not because the API was
stable; it was committed to encourage developers to update it as it
changed because it is *not* stable. That's not the kind of interface you
want exported for users to rely on, but no one should have to search
commit logs to understand why the doc exists, so I think exporting it
was just a mistake on the kernel side. To say this doc is "good"
misunderstands what it was trying to accomplish, and what it ultimately
created instead: technical debt.
The block interfaces documented in Documetation/ABI/stable/ are reliably
stable, though.
next prev parent reply other threads:[~2024-04-16 14:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-08 15:13 API break, sysfs "capability" file Lennart Poettering
2024-04-08 17:43 ` Linux regression tracking (Thorsten Leemhuis)
2024-04-08 18:41 ` Keith Busch
2024-04-08 20:23 ` Lennart Poettering
2024-04-08 22:41 ` Keith Busch
2024-04-09 6:09 ` Hannes Reinecke
2024-04-09 8:19 ` Lennart Poettering
2024-04-09 14:15 ` Christoph Hellwig
2024-04-09 15:17 ` Jens Axboe
2024-04-16 9:26 ` Linux regression tracking (Thorsten Leemhuis)
2024-04-17 15:07 ` Christoph Hellwig
2024-04-16 14:18 ` Lennart Poettering
2024-04-16 14:22 ` Jens Axboe
2024-04-16 14:25 ` Lennart Poettering
2024-04-16 14:33 ` Jens Axboe
2024-04-24 8:09 ` Linux regression tracking (Thorsten Leemhuis)
2024-04-25 13:08 ` Christoph Hellwig
2024-04-16 14:23 ` Lennart Poettering
2024-04-16 14:44 ` Keith Busch [this message]
2024-04-17 15:13 ` Christoph Hellwig
2024-04-17 15:48 ` Lennart Poettering
2024-04-17 15:59 ` Christoph Hellwig
2024-04-17 16:10 ` Lennart Poettering
2024-04-17 16:22 ` Christoph Hellwig
2024-04-17 16:26 ` Lennart Poettering
2024-04-17 16:38 ` Christoph Hellwig
2024-04-18 6:28 ` Hannes Reinecke
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=Zh6O5zTBs5JtV4D2@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mzxreary@0pointer.de \
--cc=regressions@lists.linux.dev \
/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