Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3833428ybl; Mon, 26 Aug 2019 01:00:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEbYhJllrpebVvJyzzrZl9ppXCBut0mpEdWbEG9JUCXZ7fSTrFiVblR4RxKrmNhmYSjKYO X-Received: by 2002:a65:620a:: with SMTP id d10mr15045303pgv.8.1566806448241; Mon, 26 Aug 2019 01:00:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566806448; cv=none; d=google.com; s=arc-20160816; b=rG2Npwl2ZrBv+IVF2njDlDZ4alb1EWv4J+Cjk7nfCAuFtGTzupVky85u1HDW7O5rxd jUHskgfb6lu643uHwKaodBOydBTLslq+qpY4h6zCkOHne35MBRMABjfHbYSikuXEkxiU AI3Dyb9q5Gys14hbl0XdptFdOOUIMHoaNYQTFq9uyABoFteGkbg8i8P9HzBIp+2HM3CB HMRzOcMww3GyCdTXDMELtjjNaFYFVVZPlVVjC4nNMF3jmDmafyuc/rEZL8KLdJ46ghpU RjFZVxBiBe0jgEF1mGdNwFLyKN+9BlL49sgYnS9Lqaw2mMgq+GNXADjKfancaKrjwz9p rfCA== 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:dkim-signature; bh=qZNxSjx9iRtHm4roIqJkv67sUyUaB72+jCSDUMQqD7M=; b=Ch4ua47kwGjQgTel3Tx+mnMN9+CXL54AZnvNpdSKAbWdsNeVyh1/WsGdC3WP6ZSIiL zZI1hgLTWoDyoNi4zik4uM5XHJSjIfDaH0e4SwYbGKWXsJNq9au/rbzjRSqV6WvM3XTW I6+RdaIwXdVFvL+uFbxQmo8TKQOJsfKVWZ7ZV5+XXfT5dSlcJ0glNwifZFR/BbKFbRO1 Nmo2bJbcrMgsa7kvCB8Bd2+SWc22me/jJo52JEcOI+tFkWwHWn2FDjZmdEhCB75biylk 4+8mflpEImfNxX6bap0ImakYHIzhB1m1R0btBAsLG3NMcjmhT0hwyjGlI1X2cHajDA0X 0GxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wiyo61hu; 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 t23si8765400plr.108.2019.08.26.01.00.33; Mon, 26 Aug 2019 01:00:48 -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; dkim=pass header.i=@kernel.org header.s=default header.b=wiyo61hu; 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 S1730385AbfHZH7W (ORCPT + 99 others); Mon, 26 Aug 2019 03:59:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:53090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730136AbfHZH7W (ORCPT ); Mon, 26 Aug 2019 03:59:22 -0400 Received: from localhost (unknown [89.205.128.246]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 24B7F20874; Mon, 26 Aug 2019 07:59:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566806361; bh=OG9SJrchwTyiBC/xl+WDAoFEZMQOTDerXnkioTTM3sM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wiyo61huaB4sjI4sLb9RjnSExn8D+WToxUCMZXwaMWgjaE6DvvmH0G15+xsVeq/tT n1xSuyM6d+iR8Ncv6a4mU5pxce3zVpIaDN6nUud/Z847ifvoHFIv5hGIVStAfrViL7 tNmTmbwVNL0PU1BcNb0/cwva3iknwa0+LZCHZW0o= Date: Mon, 26 Aug 2019 09:59:16 +0200 From: Greg Kroah-Hartman To: Christoph Hellwig Cc: Sagi Grimberg , linux-nvme@lists.infradead.org, Keith Busch , James Smart , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/3] nvme: fire discovery log page change events to userspace Message-ID: <20190826075916.GA30396@kroah.com> References: <20190712180211.26333-1-sagi@grimberg.me> <20190712180211.26333-4-sagi@grimberg.me> <20190822002328.GP9511@lst.de> <205d06ab-fedc-739d-323f-b358aff2cbfe@grimberg.me> <20190826065639.GA11036@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190826065639.GA11036@lst.de> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 26, 2019 at 08:56:39AM +0200, Christoph Hellwig wrote: > 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? Yes we do, userspace should use it to order events. Does udev not handle that properly today? thanks, greg k-h