From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751966AbdKFJN3 (ORCPT ); Mon, 6 Nov 2017 04:13:29 -0500 Received: from verein.lst.de ([213.95.11.211]:44397 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751727AbdKFJN0 (ORCPT ); Mon, 6 Nov 2017 04:13:26 -0500 Date: Mon, 6 Nov 2017 10:13:24 +0100 From: Christoph Hellwig To: Keith Busch Cc: Christoph Hellwig , 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: <20171106091323.GA30382@lst.de> 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> <20171104153844.GA12777@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171104153844.GA12777@localhost.localdomain> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 04, 2017 at 09:38:45AM -0600, Keith Busch wrote: > 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. You're right. But that means we will indeed always have a matching integrity payload here and the check should not be needed. Are you fine with turning it into something like: if (WARN_ON_ONCE(ns->ms && !blk_integrity_rq(req))) return BLK_STS_IOERR; ?