Received: by 10.223.164.197 with SMTP id h5csp188979wrb; Sat, 4 Nov 2017 08:35:15 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RDPu/TevM11dBLQnrM5Yd5Q4ABiBp3QWUbAe/z6NkMM9KE1lm+8QVR1r1tBIj4b/LaU6Zm X-Received: by 10.159.229.15 with SMTP id s15mr9823279plq.69.1509809715436; Sat, 04 Nov 2017 08:35:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509809715; cv=none; d=google.com; s=arc-20160816; b=L2GfhTlc6ex1Hz9NFfJR+C+thkYqZOEQhaUe6wZ/Uo3y8ErrTbz1/Nbg5c4AX8XyMU M/8aDpDz59U3zO2xInEcpUAPu8mZBxb80MEfa/ZjRZaPBYUB2ZLb6BeP+KLU2CY4Oafh 7ubEOC7bVUZ3U/nNE5b974b/M+v3dy7sOtZhA8k7/bf+VDLxSYNcdGQ9SDx9AjQa950e /mbPfRv2sSWw7S/VzxzGM+8+9ZnnFu2EHnzyIke3r7YAPZ35VJJBHRSF5P/JgnWJyiUX 5g+HeT239xMP16iM3mdm1CAU+yAzfWDnimAWP10ar97xeyyZ9TxRjGf7GjmtCU6cnTOw jI6w== 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:arc-authentication-results; bh=ZQk+XhPOIb1vBD7C6os+Yy4SO4y80Pf0CaSV2e55W9I=; b=kF9aTxDXkShqoXa6Z4plN8vbZr9zJDzV7L8sjpI7Va90AxJbo9/44RCyEkxAi2Pfzj GPRO1RXIVWQ5sQh21GqwgN4066VyjwyC0lFHPDAPn98+aHYvZ0xdoehhad2xsJ+o0hjA AY1zpGgqJ8Hlq9vc8qnb4cMBkyizjV/cR4QEEPjqzAxcgKDVMHMh0R1P7laq1wQW+89o rVSl4J1Dabz9MN/2UJn5UHArBXe6zE4hYpaZt82dSa7pbcba0w2OHvYAJf1M2226/iYa IgrX/82godcpZ6hf8h1MZNXSe/vQkbW1jR0vnK/e3e213aoS7iLKwRtj5DwvUjC4q49T wACw== 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 h186si2032597pge.124.2017.11.04.08.35.03; Sat, 04 Nov 2017 08:35:15 -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 S933546AbdKDPe2 (ORCPT + 92 others); Sat, 4 Nov 2017 11:34:28 -0400 Received: from mga07.intel.com ([134.134.136.100]:51595 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932220AbdKDPeY (ORCPT ); Sat, 4 Nov 2017 11:34:24 -0400 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP; 04 Nov 2017 08:34:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,342,1505804400"; d="scan'208";a="169311513" Received: from unknown (HELO localhost.localdomain) ([10.232.112.44]) by orsmga005.jf.intel.com with ESMTP; 04 Nov 2017 08:34:22 -0700 Date: Sat, 4 Nov 2017 09:38:45 -0600 From: Keith Busch To: Christoph Hellwig Cc: Javier =?iso-8859-1?Q?Gonz=E1lez?= , sagi@grimberg.me, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Javier =?iso-8859-1?Q?Gonz=E1lez?= Subject: Re: [PATCH 1/3] nvme: do not check for ns on rw path Message-ID: <20171104153844.GA12777@localhost.localdomain> References: <1509703370-20379-1-git-send-email-javier@cnexlabs.com> <1509703370-20379-2-git-send-email-javier@cnexlabs.com> <20171103125339.GA25186@lst.de> <20171103150203.GA11300@localhost.localdomain> <20171104081825.GA19180@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171104081825.GA19180@lst.de> User-Agent: Mutt/1.9.0 (2017-09-02) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 04, 2017 at 09:18:25AM +0100, Christoph Hellwig wrote: > On Fri, Nov 03, 2017 at 09:02:04AM -0600, Keith Busch wrote: > > If the namespace has metadata, but the request doesn't have a metadata > > payload attached to it for whatever reason, we can't construct the command > > for that format. We also can't have the controller strip/generate the > > payload with PRACT bit set if it's not a T10 format, so we just fail > > the command. > > The only metadata payload a READ or WRITE request can have is a protection > information one. For a namespace formatted with protection information > bio_integrity_prep as called from blk_mq_make_request will ensure we > always have metadata attached. > > If a namespace is formatted with non-PI metadata we will never have > metadata attached to the bio/request and should not even present the > namespace to the kernel. That's not quite right. For non-PI metadata formats, we use the 'nop_profile', which gets the metadata buffer allocated so we can safely use a metadata formatted namespace. There's no in-kernel user of the allocated payload, but we still need the metadata buffer in order to use the namespace at all. From 1583122837985732265@xxx Sat Nov 04 08:19:50 +0000 2017 X-GM-THRID: 1583038799453206809 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread