Re: [PATCH] nbd: provide a way for userspace processes to identify device backends
From: Prasanna Kalever <hidden>
Date: 2021-05-27 05:23:37
Also in:
lkml
On Wed, May 26, 2021 at 7:44 PM Matteo Croce [off-list ref] wrote:
On Wed, May 19, 2021 at 4:33 PM Matteo Croce [off-list ref] wrote:quoted
On Tue, May 18, 2021 at 9:52 AM Prasanna Kalever [off-list ref] wrote:quoted
quoted
BTW, loop has similar issue, and patch of 'block: add a sequence number to disks' is added for addressing this issue, what do you think of that generic approach wrt. this nbd's issue? such as used the exposed sysfs sequence number for addressing this issue? https://lore.kernel.org/linux-block/YH81n34d2G3C4Re+@gardel-login/#r (local)If I understand the changes and the background of the fix correctly, I think with that fix author is trying to monotonically increase the seq number and add it to the disk on every single device map/attach and expose it through the sysfs, which will help the userspace processes further to correlate events for particular and specific devices that reuse the same loop device.Yes, but nothing prevents to use diskseq in nbd, and increase it on reconfigure. That would allow to detect if the device has been reconfigured. Regards, -- per aspera ad upstreamFYI: I just sent a v2 of the diskseq change https://lore.kernel.org/linux-block/20210520135622.44625-1-mcroce@linux.microsoft.com/ (local)
Thanks, Matteo, I will take a look. Just to set the expectation here, I don't have any thoughts on leverage the diskseq number for nbd as part of this patch. This patch is trying to solve a different problem which is more severe for us than helping to identify the reconfigured events. That all said, once diskseq patches are merged, I will surely open a new patch with the required changes in nbd, to leverage diskseq number. Best Regards, -- Prasanna
-- per aspera ad upstream