On Wed, 2021-06-23 at 14:03 +0200, Hannes Reinecke wrote: > On 6/23/21 12:58 PM, Matteo Croce wrote: > > From: Matteo Croce > > > > With this series a monotonically increasing number is added to disks, > > precisely in the genhd struct, and it's exported in sysfs and uevent. > > > > This helps the userspace correlate events for devices that reuse the > > same device, like loop. > > > I'm failing to see the point here. > Apparently you are assuming that there is a userspace tool tracking > events, and has a need to correlate events related to different > instances of the disk. > But if you have an userspace application tracking events, why can't the > same application track the 'add' and 'remove' events to track the > lifetime of the devices, and implement its own numbering based on that? > > Why do we need to burden the kernel with this? > > Cheers, > > Hannes Hi, It is not an assumption, such tool does exist, and manually tracking does not work because of the impossibility of reliably correlating events to devices (we've tried, again and again and again), which is the purpose of this series - to solve this long standing issue, which has been causing problems both in testing and production for a long time now, despite our best efforts to add workaround after workaround. For more info please see the discussion on the v1: https://lore.kernel.org/linux-fsdevel/20210315201331.GA2577561@casper.infradead.org/t/#m5b03e48013de14b4a080c90afdc4a8b8c94c30d4 and the bug linked in the cover letter: https://github.com/systemd/systemd/issues/17469#issuecomment-762919781 -- Kind regards, Luca Boccassi