linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* API break, sysfs "capability" file
@ 2024-04-08 15:13 Lennart Poettering
  2024-04-08 17:43 ` Linux regression tracking (Thorsten Leemhuis)
  0 siblings, 1 reply; 27+ messages in thread
From: Lennart Poettering @ 2024-04-08 15:13 UTC (permalink / raw)
  To: linux-block

Hi!

So this broke systemd:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e81cd5a983bb35dabd38ee472cf3fea1c63e0f23

We use the "capability" sysfs attr to figure out if a block device has
part scanning enabled or not. There seems to be no other API for
this. (We also use it in our test suite to see if devices match are
expectations, and older systemd/udev versions used to match agains it
from udev rules.)

The interface was part of sysfs, and documented:

https://www.kernel.org/doc/html/v5.5/block/capability.html

While it doesn't list the partscan bit it actually does document that
one is supposed to look into include/linux/genhd.h for the various
bits and their meanings. I'd argue that makes them API to some level.

Could this please be reverted? Just keeping the relevant bits (i.e. at
least the media change feature bit, and the part scanning bit) is
enough for retaining userspace compat.

(Please consider googling or a github code search or so before removing
a public API like this. This compat breakage was very much avoidable
with a tiny bit of googling.)

Lennart

--
Lennart Poettering, Berlin

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2024-04-25 13:15 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).