Re: API break, sysfs "capability" file

From: Lennart Poettering
Date: Wed Apr 17 2024 - 12:27:13 EST


eOn Mi, 17.04.24 18:22, Christoph Hellwig (hch@xxxxxx) wrote:

> On Wed, Apr 17, 2024 at 06:10:21PM +0200, Lennart Poettering wrote:
> > Well, there are plenty of other block devices with part scanning off,
> > such as DM, including dm-crypt, dm-integrity and so on. And that's
> > certainly stuff we want to cover for this.
>
> But there is no good reason to prohibit scanning for them. We can't
> scan by default as that would probably break a few expectations in
> userspace, but we can trivially allow manual scanning.

Hmm, so you want to generically allow toggling the flag from
userspace? I mean that'd be fine with me, but it would feel a bit
weird if you let's say have a partition block device, where you'd
toggle this, and then you have two levels of part scanning, and then
you toggle it on one of the part block devices there and so on, and so
on. Could that work at all with the major/minor allocation stuff?

But let's say you add such a user-controlled thing, if you'd add that
I figure you really also need a way to query the current state, right?
which is basically what I originally was looking for...

i.e. it would be really weird if we could set the flag, but not query
it in the first place.

Lennart

--
Lennart Poettering, Berlin