Re: [PATCH 0/5] block: add a sequence number to disks

From: Lennart Poettering
Date: Mon Feb 08 2021 - 16:41:28 EST


On Sa, 06.02.21 01:08, Matteo Croce (mcroce@xxxxxxxxxxxxxxxxxxx) wrote:

> From: Matteo Croce <mcroce@xxxxxxxxxxxxx>
>
> 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.
>
> The first patch is the core one, the 2..4 expose the information in
> different ways, while the last one increase the sequence number for
> loop devices at every attach.

Patch set looks excellent to me. This would be great to have for the
systems project, as it would allow us to fix some major races around
loop device allocation, that are relatively easily triggered on loaded
systems.

Lennart