Re: [PATCH] nbd: provide a way for userspace processes to identify device backends
- To: Prasanna Kalever <pkalever@redhat.com>
- Cc: Ming Lei <ming.lei@redhat.com>, Prasanna Kumar Kalever <prasanna.kalever@redhat.com>, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, nbd@other.debian.org, Josef Bacik <josef@toxicpanda.com>, Jens Axboe <axboe@kernel.dk>, Ilya Dryomov <idryomov@redhat.com>, Xiubo Li <xiubli@redhat.com>, Lennart Poettering <lennart@poettering.net>, Luca Boccassi <bluca@debian.org>
- Subject: Re: [PATCH] nbd: provide a way for userspace processes to identify device backends
- From: Matteo Croce <mcroce@linux.microsoft.com>
- Date: Wed, 19 May 2021 16:33:19 +0200
- Message-id: <[🔎] CAFnufp3ZzrKHiV1Vy9_bAymy0oEr288dL4yWo4EjqUzhJV6J-A@mail.gmail.com>
- In-reply-to: <[🔎] CANwsLLH0HyZ-VGPMc+VmuLivG1fiZHnSqUyLx3UWb76ZMCgYSg@mail.gmail.com>
- References: <20210429102828.31248-1-prasanna.kalever@redhat.com> <[🔎] YKMKdHPFCNhR1SXx@T590> <[🔎] CANwsLLH0HyZ-VGPMc+VmuLivG1fiZHnSqUyLx3UWb76ZMCgYSg@mail.gmail.com>
On Tue, May 18, 2021 at 9:52 AM Prasanna Kalever <pkalever@redhat.com> wrote:
> > 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
>
> 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 upstream
Reply to: