Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp290714ybl; Fri, 23 Aug 2019 00:35:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWnfG+3GemE9rbYBbXkDNJEATnBxH6G+KQnXZKzLhuxOqTcZzLOGup9duZ7K7lo4c+B/8x X-Received: by 2002:a65:6846:: with SMTP id q6mr2805684pgt.150.1566545721301; Fri, 23 Aug 2019 00:35:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566545721; cv=none; d=google.com; s=arc-20160816; b=Lr/HOWoJpxxp8G5kFKr/IYlcdW+BPxhLAB3JMMemcdpyVMgt/MVuKVi25Kr3dV8gbv N9hV2i3PjmfuhdfHu0TczmEtQRIPAcwJLU7TP/hPovJ2hoeqZQdgo602iecLlx5GL4Fo yA2I4snPNOByx830ssJDBAv0P1OZT50End9b6sAh2DQsiiROrM3g8PzWVccAJUk3eIpT LAltJXztJW3sM57ti0vwvIlw0A+ryEq2z1XpGv2tAEVuvfIYMyAvKdarb1SxdZrW2NoF hOitqJrUr1TiI5rjRVHP7ocaVsMWrVz0lukl0Rj8GUxzA2FZ36rPv3AJiYNUlMdKBulF KivQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject; bh=24eP7T52+CYL2dNJV8R097RDf634lSS5yuSIePFHGwk=; b=bpfkmRQeywOtmGI4FTMUJBTZ4oAr3pYhk5ADLMm8QUUbotGxDTiT7ZZ8N6qSrtAOlL h54OHajXS1e+KX743DBMdp7mF1AU1v44nUrd0/MjISCLaNMr05bPSPpwP826H2KCrTwB Kr3iEKdzzAbNJ2fv46f5vR65r0H0ao/ZRTcgY9lG4C817iCpZApHnTNm2i6fOCKw8lpH Qkdmbzd6QJXs9f4OUkSKAh7OInu6e9ccyCIpvoMLd0MGBr4YQE3skJV+kZa7ERyhs8cO v8suMRg0sw4FGaRV3x4aJk5XegNg6PB99N4rP0oMWyrOJMWj5ewOFX+VMw2BjZtDrvIS zM+w== 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 em12si1662933pjb.25.2019.08.23.00.35.05; Fri, 23 Aug 2019 00:35:21 -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 S2403806AbfHVTRn (ORCPT + 99 others); Thu, 22 Aug 2019 15:17:43 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:46571 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391860AbfHVTRn (ORCPT ); Thu, 22 Aug 2019 15:17:43 -0400 Received: by mail-ot1-f65.google.com with SMTP id z17so6471255otk.13; Thu, 22 Aug 2019 12:17:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=24eP7T52+CYL2dNJV8R097RDf634lSS5yuSIePFHGwk=; b=eAbrKm5FJNzAHkCS/Z5RTD47hOZKeWADSxBDfsmBNfsJa31aNePzf2DAaBqnqn+TcN cE6/kDiRsa4mthXJs42kKSP5E3jo1dtIjG1EoYi8ecz9tgmWp3xWrNniJhAxNcU5cT6B 5N57E849AJefGrd7xA4mMC5jrWcWLH/P0B1gaPs+wEwfvKVe3gEw5/eBrVebsO0CrZPI 5ifJJOXkzLBJMYgJr0qz+HSfHrRieVvlty7C3ioBSzq5L+GbxOW5RWJo2esyu3cQuIqh pB38rZMsIIQ6K5avEvVQzxHRuU2q/uGX1GyIjlAADceGGKw5vMCY/+Y+VOIgkQXyOpc0 XcQA== X-Gm-Message-State: APjAAAUbqws7Ok41kGbUAZJeq/ROhgLjIO9Jcz0rWCtbhYtQusVcm/mR EPc19iKyO2mt6bZtfTqBiPI= X-Received: by 2002:a05:6830:1db2:: with SMTP id z18mr1087490oti.110.1566501462198; Thu, 22 Aug 2019 12:17:42 -0700 (PDT) Received: from ?IPv6:2600:1700:65a0:78e0:514:7862:1503:8e4d? ([2600:1700:65a0:78e0:514:7862:1503:8e4d]) by smtp.gmail.com with ESMTPSA id j6sm157680otq.16.2019.08.22.12.17.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Aug 2019 12:17:41 -0700 (PDT) Subject: Re: [PATCH v7 08/14] nvmet-core: allow one host per passthru-ctrl From: Sagi Grimberg To: Max Gurtovoy , Logan Gunthorpe , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: Chaitanya Kulkarni , Stephen Bates , Jens Axboe , Keith Busch , Christoph Hellwig References: <20190801234514.7941-1-logang@deltatee.com> <20190801234514.7941-9-logang@deltatee.com> <05a74e81-1dbd-725f-1369-5ca5c5918db1@mellanox.com> <5717f515-e051-c420-07b7-299bcfcd1f32@mellanox.com> <24e2ddd0-4b2a-8092-cf91-df8c0fb482e5@grimberg.me> Message-ID: Date: Thu, 22 Aug 2019 12:17:39 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <24e2ddd0-4b2a-8092-cf91-df8c0fb482e5@grimberg.me> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>> I don't understand why we don't limit a regular ctrl to single >>>> access and we do it for the PT ctrl. >>>> >>>> I guess the block layer helps to sync between multiple access in >>>> parallel but we can do it as well. >>>> >>>> Also, let's say you limit the access to this subsystem to 1 user, >>>> the bdev is still accessibly for local user and also you can create >>>> a different subsystem that will use this device (PT and non-PT ctrl). >>>> >>>> Sagi, >>>> >>>> can you explain the trouble you meant and how this limitation solve >>>> it ? >>> >>> Its different to emulate the controller with all its admin >>> commands vs. passing it through to the nvme device.. (think of format >>> nvm) >>> >>> >>> >> we don't need to support format command for PT ctrl as we don't >> support other commands such create_sq/cq. > > That is just an example, basically every command that we are not aware > of we simply passthru to the drive without knowing the implications > on a multi-host environment.. If we were to change the logic of nvmet_parse_passthru_admin_cmd to have the default case do nvmet_parse_admin_cmd, and only have the vendor-specific space opcodes do nvmet_passthru_execute_cmd then I could not see at the moment how we can break a multi-host export...