Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3781339ybl; Sun, 25 Aug 2019 23:57:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrGsgBxCTP2mqqWT1YQfGXSQogcfYGGuo+habuIUdIj8qKXux/VIN+yiMZ8ONMmyPjp8sT X-Received: by 2002:a17:90a:7783:: with SMTP id v3mr17753388pjk.109.1566802677240; Sun, 25 Aug 2019 23:57:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566802677; cv=none; d=google.com; s=arc-20160816; b=hpTNdDh0DkXQ4nNduWbYP8kORSTB0zl2VACPwK58jhSIaQ87B/unpf25hMAUkBJvRs NKwVMEgDxW6vk9VInOE+lWdjIoIAt79XQ9iLZTyGg71SgWTwHtxFdsR2isGWfzvfMk8y uDJDs5XPY9NaAqQT7y4MTevbb8TkenHKyjTOETisT8Oj3QVIr73VP3Z0vgv7MfTEkTL+ h5tDZ9aCXedFm9VgAqP1rcE08SCsD5XPVS13YPUST7gp2Z0SykQxoCq4myxQDok6hDYo 12Ikw1t3Jg/XDVfmJ68ed3LB0tO2fE4PLasfg4ahYPC81MZ1BIUII5thclL+8xbASph7 N1oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=JyADA5Zq5uMT8FxW2jyndEmr4IWTAhbJPGE5kvvJz7Y=; b=ULqJGmgzI8S5e8jya2l1vbk7WUoA0Du0WdwE37jug/GuE4wjCANlAsIebcP08bNmOC dfEKmHiL60ddFlIdPvnN4ttKdFfdbucmXOuovH2AImKj8UUTJbtOxPFhSsJXqxNO8pq0 Zdx8yf6pMxz8TSBfSKF2t8DmIONhzHAN6053yWjClxMGjO6bkyV0X7L4ObcPWVfJKuc/ /qH+0FrSSqiBBXiVUgzvlffEf378cto8MFpimV8QIARHB9oX/HIHzUk63LTUYPEVIhiq zdYwwcXAJpSqCgh3yVh1ZszVktq7jUjYw09zoZFeebWfwgeFJJdyAYr4Fpq3psRKP8gC K4NA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si8219273pgc.396.2019.08.25.23.57.42; Sun, 25 Aug 2019 23:57:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729650AbfHZG4n (ORCPT + 99 others); Mon, 26 Aug 2019 02:56:43 -0400 Received: from verein.lst.de ([213.95.11.211]:46222 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728033AbfHZG4n (ORCPT ); Mon, 26 Aug 2019 02:56:43 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id B993E68B20; Mon, 26 Aug 2019 08:56:39 +0200 (CEST) Date: Mon, 26 Aug 2019 08:56:39 +0200 From: Christoph Hellwig To: Sagi Grimberg Cc: Christoph Hellwig , linux-nvme@lists.infradead.org, Keith Busch , James Smart , linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: Re: [PATCH v2 3/3] nvme: fire discovery log page change events to userspace Message-ID: <20190826065639.GA11036@lst.de> References: <20190712180211.26333-1-sagi@grimberg.me> <20190712180211.26333-4-sagi@grimberg.me> <20190822002328.GP9511@lst.de> <205d06ab-fedc-739d-323f-b358aff2cbfe@grimberg.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 22, 2019 at 12:10:23PM -0700, Sagi Grimberg wrote: >> You are correct that this information can be derived from sysfs, but the >> main reason why we add these here, is because in udev rule we can't >> just go ahead and start looking these up and parsing these.. >> >> We could send the discovery aen with NVME_CTRL_NAME and have >> then have systemd run something like: >> >> nvme connect-all -d nvme0 --sysfs >> >> and have nvme-cli retrieve all this stuff from sysfs? > > Actually that may be a problem. > > There could be a hypothetical case where after the event was fired > and before it was handled, the discovery controller went away and > came back again with a different controller instance, and the old > instance is now a different discovery controller. > > This is why we need this information in the event. And we verify this > information in sysfs in nvme-cli. Well, that must be a usual issue with uevents, right? Don't we usually have a increasing serial number for that or something? If I look at other callers of kobject_uevent_env none throws in such a huge context. > > Makes sense? ---end quoted text---