Re: [PATCH -next 1/5] block: add disk sequence number
From: Matteo Croce <hidden>
Date: 2021-03-23 17:45:20
Also in:
linux-fsdevel, lkml
From: Matteo Croce <hidden>
Date: 2021-03-23 17:45:20
Also in:
linux-fsdevel, lkml
On Tue, Mar 16, 2021 at 2:44 AM JeffleXu [off-list ref] wrote:
On 3/16/21 4:02 AM, Matteo Croce wrote:quoted
From: Matteo Croce <redacted> Add a sequence number to the disk devices. This number is put in the uevent so userspace can correlate events when a driver reuses a device, like the loop one.Hi, I'm quite interested in this 'seqnum'. Actually I'm also planing to add support for some sort of 'seqnum' when supporting IO polling for dm devices, so that every time dm device changes its dm table, the seqnum will be increased.
Interesting, thanks!
As for your patch, @diskseq is declared as one static variable in inc_diskseq(). Then I doubt if all callers of inc_diskseq() will share *one* counting when inc_diskseq() is compiled as the separate call entry rather than inlined.
That would be true if the static declaration was in the .h, but being in genhd.c it goes in vmlinux once. Maybe you get confused by the inc_diskseq prototype in the header file, but the function body is in the .c Regards, -- per aspera ad upstream