Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp253404imm; Tue, 15 May 2018 00:52:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoDT0Aiy3CyblIKfgOU7A7rG45SItmw4uQX4Nb+9vWFnJZ93ShMNFUYD5o0rRWjRd/TNIlD X-Received: by 2002:a17:902:981:: with SMTP id 1-v6mr797755pln.11.1526370770719; Tue, 15 May 2018 00:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526370770; cv=none; d=google.com; s=arc-20160816; b=V2yaWYQ/1xqFkpZtyLnhimglGVgcYQ0ivmA6IZK32jpPgPbxqVK7IrDzJ3+p0V8pux QrYax5IikZpNGr9moLET8/9K6WNreZifHPv8z8SSXuX06edZa+JV9F0tTgrZfGGtxOUe J7u7CVXBAf834uPeXxce3GRIWk4h7IwQXpi6p4b0GMw9F2JGpniMTK/zUs2EbxidA7O3 aPLGPzn8QM4zhBQ2gAEElQuo0nJvfbN+RhL3W41aJnw0rtJp0W39SceK7DvItiG7TiCw rRrtF4mHCKDxs6cCRpGOG5ibJ8lx0hFKr196lpAnhFYbwdt1AEjB2gPK68Vq0zq+jP/N Y/Yw== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=rklVMcWczbVtakXeDNbp2xk554HJvkebGTZDn17TG+w=; b=S+TG1ycxViw9mBJkUvLBJAL2pLlXQJiV2O7SAuSzjBGpeFZ3jHGJ+1x/m4uUHDWjFF iWVAIlWepWrDb80yAXvJBeVg7HPHeW+OLk+4KGsjulV85LDelLE5+dqAtEWYQnjhZi2Z AIRaUMFJHmmLxjec/MWp8CyPKqRrhQ46V5sxTpcHt3ueUzzMEgAgJVuv+kfSpL1u+fe4 hg7Lukt2sEq3BNNgk5/nByN+jEq+laE2aqm2jDR0T3bXp//3h2JSJtwlBxHXe2kh5OyF Ct0lxeXNQ12Qndkaxa6AFTKDOxpT0g28giL6b4aEnDBs0DimhGYUlCKiD9JL4kzFjloz jdaw== 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 k2-v6si11070569plt.374.2018.05.15.00.52.36; Tue, 15 May 2018 00:52:50 -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 S1752289AbeEOHwY (ORCPT + 99 others); Tue, 15 May 2018 03:52:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:43995 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752155AbeEOHwX (ORCPT ); Tue, 15 May 2018 03:52:23 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 37E89ADFF; Tue, 15 May 2018 07:52:22 +0000 (UTC) Date: Tue, 15 May 2018 09:52:21 +0200 From: Johannes Thumshirn To: Christoph Hellwig Cc: Keith Busch , Sagi Grimberg , Linux NVMe Mailinglist , Linux Kernel Mailinglist , Hannes Reinecke Subject: Re: [PATCH 3/5] nvme: call nvmf_create_ctrl before checking for duplicate assignment Message-ID: <20180515075221.4ppaxdvbosy36ltk@linux-x5ow.site> References: <20180515074043.22843-1-jthumshirn@suse.de> <20180515074043.22843-4-jthumshirn@suse.de> <20180515075055.GB23659@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180515075055.GB23659@lst.de> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 15, 2018 at 09:50:55AM +0200, Christoph Hellwig wrote: > On Tue, May 15, 2018 at 09:40:41AM +0200, Johannes Thumshirn wrote: > > In nvmf_dev_write we did check if the /dev/nvme-fabrics device node's > > private data is already set and then create a controller data > > structure afterwards. The private data is protected by the > > nvmf_dev_mutex, but there is no need to hold it while calling > > nvmf_create_ctrl(). > > > > This also reduces the number of lockdep complaints in the 'nvme > > connect' with fcloop scenario. > > Something looks seriously fishy in fcloop. How do we and up in > a RCU critical section here? __blk_mq_run_hw_queue() calls blk_mq_sched_dispatch_requests() with the hctx_lock() a.k.a rcu_read_lock() held. nvmf_connect_admin_queue() does I/O which causes the above to be called. > In general it seems like fc loop needs to offload any I/O to a workqueue > just like nvme-loop does, but even then I can't see how that is going to > cause an issue in this area. Hmm I'll be looking into it. -- Johannes Thumshirn Storage jthumshirn@suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850