Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp310890pxj; Thu, 27 May 2021 00:13:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysqoDRQoVy2AtrI/xm7jaOhL+NneXsI3dnTh8Pq8rYTVfQPwFbOsQy85wls0/b+1v07PFG X-Received: by 2002:a05:6402:2064:: with SMTP id bd4mr2494696edb.96.1622099612293; Thu, 27 May 2021 00:13:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622099612; cv=none; d=google.com; s=arc-20160816; b=vZse6h82qx9Y8u8r3s0T3J9rbPPoa7MXCxl6EOgUCq/Yq8pqm4oy0ox2OnhULshAPe vkW/kdHs/UCiPewNUw6zwzCKtYR38mm8wmdvIfeUFe36VL2yROcRisON/o1OUSSM/kVo rUvtiV7l/uOdKOkf1lZJd+JQrieAR07thwMoHoYUaC20eiweOshZtvdKizTjkNjQCaWt TLzn9yGwdrh9R6xLzl2TL97Jk/mduaAeJB6DSAaaFB6Ecu6AS35GnuEvGNlhg4W+s+MC YP4CzQfbihHvMrCfZo/mDQyXOBVB8uBribs15pbzRmf57N5u/PTrtLFMbMeA4g+Do1Sg CsCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=kMolLnDEuKlCbbgIOvjZGGBzK5WYRhCAHto1CLY+p8s=; b=jM8gP1PAtL9gXheC0g5y9lWrPhk2+EJHDxYmxQcOXbt0xc7b9hKdYF4AvzEwq7uw7g zxJyqgWKVUHFIWpzOnkT9Ts3kheUqg//KSp7/AwPpp4iDDetTIVW2bF5sxKmoATcJZx2 DCIqa0JcBsQh3QiZzpPUbRi1QUyyXoIA5/wpY29HQbpBWvz7pUQNvN7KN/q1Um+3L7zH b1GgcNmfLiUT6J8PNxOGF9gjKK8I4eeYFYMvLrZ3NLtNdzeqBwPR3m2iT8FkkZPtzugU Yf3LXPU+S3qbzcIXBa88PeFvlzRDp/QAwYuwK2fZWzc0CdzODEiiS431N/b0hswh6rYa K3Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TGpZIpUJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z40si1343154ede.300.2021.05.27.00.13.08; Thu, 27 May 2021 00:13:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TGpZIpUJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233514AbhE0FYj (ORCPT + 99 others); Thu, 27 May 2021 01:24:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:57263 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232240AbhE0FYi (ORCPT ); Thu, 27 May 2021 01:24:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622092985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kMolLnDEuKlCbbgIOvjZGGBzK5WYRhCAHto1CLY+p8s=; b=TGpZIpUJddH24prhTz0/nxwz7qwQWR2QXX1cSDQdiIS31A0qAWM4Pl4q1UopVellJCP6if ZkOnL5d3EYGXaGk1uazPTwDygoqvNteSJFCR63uhv+I6CZbsBjJPtA0eP+vFceLm+rAucb Q0+8F7xWVXbFQ08UgluHaFvOSo0MBfc= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-561-pZV3FiTBPS-HgJ_wJklk_A-1; Thu, 27 May 2021 01:23:03 -0400 X-MC-Unique: pZV3FiTBPS-HgJ_wJklk_A-1 Received: by mail-wr1-f70.google.com with SMTP id a9-20020adfc4490000b0290112095ca785so1279901wrg.14 for ; Wed, 26 May 2021 22:23:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kMolLnDEuKlCbbgIOvjZGGBzK5WYRhCAHto1CLY+p8s=; b=i3PF0KtX90zvK+M2GIsUEwp6G8t3gFtanLpwlHxjxfpVVEAIUGXczVa9cXNrqjghWP nEKmQcVTUtppAjzZedcCY3Anhsq13mrs3xiYh9iaTf3WIBn8qnv8Cqr1Sw6RW0OS0PJG jPKphkfCIkF7f9yBvtFCbnsQq52fXYCcf+fZaWGxeMX2eA8PUvn95VvztCb+BXBk7qbE ZJ5L842AZrxF3K9ebos/9mpdy9vdZTP26xLq/tP+fwuqiVRiht8pqobp3QFGfB3MEJJY AdO0VQC67dhCZSYAUvtpXwqrwfYLwz9cr92BhDVSoITjrRGB65fxKIzIksDDocLrb2s+ idIw== X-Gm-Message-State: AOAM531foftPtZTQSIe4zVJCIu3xlJaXZlywy+NoArD5umoMYUNTkG0q DQmA8sPHeqQZCPtrTpVgpoJ30A/04wQwTAjiUGjIaCewGBD0/Eh3wi/j2o8Je0TnjSxHz3RmajE 0mH7uBUVTdCE8ILFGa5b5RUL/nRB02OsEggu1cmkJ X-Received: by 2002:a7b:c3d4:: with SMTP id t20mr1475250wmj.13.1622092982522; Wed, 26 May 2021 22:23:02 -0700 (PDT) X-Received: by 2002:a7b:c3d4:: with SMTP id t20mr1475236wmj.13.1622092982195; Wed, 26 May 2021 22:23:02 -0700 (PDT) MIME-Version: 1.0 References: <20210429102828.31248-1-prasanna.kalever@redhat.com> In-Reply-To: From: Prasanna Kalever Date: Thu, 27 May 2021 10:52:50 +0530 Message-ID: Subject: Re: [PATCH] nbd: provide a way for userspace processes to identify device backends To: Matteo Croce Cc: Ming Lei , Prasanna Kumar Kalever , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, nbd@other.debian.org, Josef Bacik , Jens Axboe , Ilya Dryomov , Xiubo Li , Lennart Poettering , Luca Boccassi Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 26, 2021 at 7:44 PM Matteo Croce wrote: > > On Wed, May 19, 2021 at 4:33 PM Matteo Croce wrote: > > > > On Tue, May 18, 2021 at 9:52 AM Prasanna Kalever 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 > > FYI: I just sent a v2 of the diskseq change > > https://lore.kernel.org/linux-block/20210520135622.44625-1-mcroce@linux.microsoft.com/ 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 >