Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2750564pxb; Tue, 24 Aug 2021 06:49:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRzpJzjr58NFbXaAMHou3FP8b3EzcQVmhCmcuy0wsoTGizSU0uFJMks30tLR2pCh1aSxSL X-Received: by 2002:a17:906:520b:: with SMTP id g11mr4487921ejm.502.1629812951973; Tue, 24 Aug 2021 06:49:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629812951; cv=none; d=google.com; s=arc-20160816; b=c9vGOK6d/7mora2KIe9ZYmY9mEMbj6regVi7e+O/Itks/lzdqFKhieWp6uQJAiACLK dFhTTsM4HE12qjXv9n0UX0QVt07BxYt+QLnz5q4oo1sGcA1n7aXE1KdIW8+R5KgZk/lP 4wtUCE7/zEdhxASuxf+ZHNG9k9OA8zHUARGJzNSv1Osoi6B2k5VNjh72OYQmHrCS8FTf YBgCEeALWOdgbYKFiAjZn+8GPT6W3BhqCo924XRvvBCnJqg3BNK+Yyc/3BIJlTMLZCus qtTwR8I9LipoSYwOyYHm43MMlhMXZshNhhsgX7nuuWY9i6LSGe9rxlpTB2EMTvpbnZM0 ov8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=BQT1R0eSRQSRF+rzGFAmoytGRsJKhqfXEc1Tzckzx/8=; b=0/HRH0WDGAA5Hcom9xRGeqzlKO4ciDx8Vtm90RWyGo7RH6LWH6vTAUn6+eCU1z32p/ D1A8QLBnEf3iicNv4igmyxJknX75uC4GJ/uETQWBP0+A0qAu0HDxhzi7b73lmMdMQFAb wquko78UZUJcla0G2XZsaSFRQuNalFqAAsV56yZ/swfHU9gjg/r31i9KsTjw1J+bS1n3 umqOatFr4i+qzh6sewezmQqWRd8QT0s0rByJ8ln8R/9r6X+Qoiq8k0OQXpVsGVlSQ+7O guxrWES69792GTiJ4UEsT5KRzpZNq+wuO+zjYlK5M0NMIVB67gi+4a161w4AeTpuRKpN FRpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=QO6Onyd9; dkim=neutral (no key) header.i=@suse.de; 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=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gt43si4248077ejc.5.2021.08.24.06.48.48; Tue, 24 Aug 2021 06:49:11 -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=@suse.de header.s=susede2_rsa header.b=QO6Onyd9; dkim=neutral (no key) header.i=@suse.de; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237627AbhHXNpo (ORCPT + 99 others); Tue, 24 Aug 2021 09:45:44 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:55732 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbhHXNpn (ORCPT ); Tue, 24 Aug 2021 09:45:43 -0400 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 749F92209E; Tue, 24 Aug 2021 13:44:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1629812698; h=from:from:reply-to: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=BQT1R0eSRQSRF+rzGFAmoytGRsJKhqfXEc1Tzckzx/8=; b=QO6Onyd99Thl/apaIzjmQn/MNLhZL4OBuYG1DvbASn1odsCNXJ7A5WNVVyWu9pcKolAJQo Wql0VdVYNceEQaIpkt9Q7/dedkE/ST50vB+vEnwsxTFK6EguAkZNqGQ0yQSjgJmzAtyG9S HFvytrQ0goihl4KQvXXpMcQB27yzcQk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1629812698; h=from:from:reply-to: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=BQT1R0eSRQSRF+rzGFAmoytGRsJKhqfXEc1Tzckzx/8=; b=vpOGwQaLbAxn9Qpo7vy/AzUZUgjZZe1MOodHAwiqhxtzTu1MZo2Cn2N7UIUtb0UF4XD4Pc tBbUFZxFJ1sSNpCA== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 5C66B13A50; Tue, 24 Aug 2021 13:44:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id akkTFtr3JGGuNwAAGKfGzw (envelope-from ); Tue, 24 Aug 2021 13:44:58 +0000 Date: Tue, 24 Aug 2021 15:44:57 +0200 From: Daniel Wagner To: Sagi Grimberg Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Hannes Reinecke Subject: Re: [PATCH v3] nvme: revalidate paths during rescan Message-ID: <20210824134457.x33n7ihoe23jhyfx@carbon.lan> References: <20210811152803.30017-1-dwagner@suse.de> <93e8d113-55bb-e859-bf3d-54433dd23683@grimberg.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <93e8d113-55bb-e859-bf3d-54433dd23683@grimberg.me> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 23, 2021 at 10:16:23AM -0700, Sagi Grimberg wrote: > > +void nvme_mpath_revalidate_paths(struct nvme_ns *ns) > > +{ > > + struct nvme_ns_head *head = ns->head; > > + sector_t capacity = get_capacity(head->disk); > > + int node; > > + > > + for_each_node(node) > > + rcu_assign_pointer(head->current_path[node], NULL); > > + > > + list_for_each_entry_rcu(ns, &head->list, siblings) { > > + if (capacity != get_capacity(ns->disk)) > > + clear_bit(NVME_NS_READY, &ns->flags); > > + } > > Shouldn't the null setting to current_path come after > we clear NVME_NS_READY on the ns? Otherwise we may still > submit and current_path will be populated with the ns > again... Ahh, I got it this time! Yes, you are right. I think Christoph has dropped this patch from the nvme-5.15 queue anyway. I'll resend a new version with the order changed. Daniel