Received: by 10.223.164.221 with SMTP id h29csp84578wrb; Fri, 3 Nov 2017 06:02:50 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TuRFPsC8ZyHxgITPHVhT3gWJ17NIfhc6N4Zqkeaf5azhymYu1tcDmJ/lsAMSYduFzCOvmC X-Received: by 10.101.96.68 with SMTP id b4mr6973778pgv.155.1509714170038; Fri, 03 Nov 2017 06:02:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509714170; cv=none; d=google.com; s=arc-20160816; b=BE4OzpoIEI3tKSkvQTcqucri2qdgNGgJ9LxE2NQcreIFBvO54S/8qyhVkUlhNdm83e My1pKGhYANOj0jpJ9buu46gk2ZBGJgtpjw9Khs8hur/9PFJ1vy4nEwuHH5YNMuBra7C8 XFO3prmB8nuxrmpZYKuXY/ET9gYEQHCH3FL+m0cTNkkzglsG59tQl6SBbcPvawupCG0h kmvKT65a+6iRu6NKBxhhBDK1gaP0ZOEcaOyFuTlXMBj3I7+mYlH0Px5RIORI3mLfrhCu qN+m0CXQaCvwB37p0sra/PpWANtUEhJZA+VaeIrK8S3m8UYWxPRpe9Px9p4muw4PN48O PjLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:to:cc:in-reply-to:date:subject :mime-version:message-id:from:dkim-signature :arc-authentication-results; bh=c/kMZ9rAJGpqIQ+RhzBHZovg+rO9ztDgX1QoSUW+PZQ=; b=mS37fCrfWE/NqRJDLQYKusm73qOMoQfoTpW+neA6H+Wiq31m6BHPP5SmNqk0rZb6Sl 8Y+icyk5j8MLMwL2jzobrtl0qW4TwJMkdH9eQETUSqIC0MDRYmdGFyd46EGHXeLoIZCY h+YbG3ze1s3/En5/WgySX3QNE7i7nXdhukuFdBiLTrhMZgbPfYk43zMO0ADrRrzgT9II qODLiWCA+r7eH+ux/eddSxeTHTL8wQyvRJhw4lCPSVmqTkfPQbusDa2rV0iRyscAi5uH 9jE2/cJWD6wpuH90LXb8hfc1qoWR4joxAtUSChE0DI4WhPhOoyIOZRjDDvp4VhWzQKGB a8fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=ZL38yX/E; 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 n187si6489963pfn.50.2017.11.03.06.02.35; Fri, 03 Nov 2017 06:02:49 -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; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=ZL38yX/E; 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 S1756170AbdKCNAO (ORCPT + 96 others); Fri, 3 Nov 2017 09:00:14 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:46045 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755590AbdKCNAL (ORCPT ); Fri, 3 Nov 2017 09:00:11 -0400 Received: by mail-wm0-f42.google.com with SMTP id y80so1373144wmd.0 for ; Fri, 03 Nov 2017 06:00:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=c/kMZ9rAJGpqIQ+RhzBHZovg+rO9ztDgX1QoSUW+PZQ=; b=ZL38yX/EVzz9qplyPCgxtPhZ0aSSPXrGkyK2iiKu1v8S+tOxo9U/77THSVzD4tVYEF fO5pncNJ9AjhyDWgFkH3OecBygXeWcDqHXvI7LF5yzBAM3hBvh095sxgTYk2j8lkS+8/ I8mQFzBW60peqoK5eREwfU87e8cpvZmN7SE1JZffqUBQReaeYDKC3fMOg7s5lFYTf39i r32rOoiHXsRLPTvtwVz3Iwm/j5ym5yCj7cX0dZEtZg/3Pqbcs7GrauNolkEHcXjlFVMO Yb8b6xAfaMk8KhlLkv+UU/NTkI4Nk2JEG1zChXLQsYB0R7H1yBWNytAqj1mPxekr77Sn 9Y+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=c/kMZ9rAJGpqIQ+RhzBHZovg+rO9ztDgX1QoSUW+PZQ=; b=BRgOphytQp2k7dqLyjLD/KR0jt5t82oP7+WxHi25nKBNN1QuTeWlX9SweRPDN0ExrE +SXTnJMq2bFEhyuSKXbRHFLTkIvc+iceOOhXs6p1z70i/qyQL05lb2UNN/3GJx/vscQb zBFDDpyAF+0kojxUfOqa99pw86FcQeGYhJ+nPqJUitMqoiJi4Pzw9Ds5SKPS0lWEBky0 vArvPr3Em0uaTmmPncpYavgtL2dhZ3fG77UMfcEXdhhh31InQoGkS+Jn/+1xOLFQvCkT SHwwfbv9W5AG1GBe8fBzQwM8/u22mfDJF8HxX7NwbM6LJvubfZK6Z2xWWBLwQ/nJyK0k NG2w== X-Gm-Message-State: AMCzsaWad6K7OIEZh0qt4ypVkq3KNttsF0zsfWzGeAApnWxC7p5qf2Cv TRt88rXtNcL2L0ac6gA36L9XaA== X-Received: by 10.80.213.214 with SMTP id g22mr8748798edj.277.1509714010347; Fri, 03 Nov 2017 06:00:10 -0700 (PDT) Received: from mac-halley13.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id h16sm4880237edj.33.2017.11.03.06.00.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Nov 2017 06:00:09 -0700 (PDT) From: =?utf-8?Q?Javier_Gonz=C3=A1lez?= Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_00ED9334-FF4B-405C-86F1-B32963AAF0FF"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH 1/3] nvme: do not check for ns on rw path Date: Fri, 3 Nov 2017 14:00:08 +0100 In-Reply-To: <20171103125339.GA25186@lst.de> Cc: Sagi Grimberg , keith.busch@intel.com, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org To: Christoph Hellwig References: <1509703370-20379-1-git-send-email-javier@cnexlabs.com> <1509703370-20379-2-git-send-email-javier@cnexlabs.com> <20171103125339.GA25186@lst.de> X-Mailer: Apple Mail (2.3273) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Apple-Mail=_00ED9334-FF4B-405C-86F1-B32963AAF0FF Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On 3 Nov 2017, at 13.53, Christoph Hellwig wrote: > >> - if (ns && ns->ms && >> + if (ns->ms && >> (!ns->pi_type || ns->ms != sizeof(struct t10_pi_tuple)) && >> !blk_integrity_rq(req) && !blk_rq_is_passthrough(req)) >> return BLK_STS_NOTSUPP; > > blk_rq_is_passthrough also can't be true here. > > How about: > > if (ns->ms && !blk_integrity_rq(req) && > (!ns->pi_type || ns->ms != sizeof(struct t10_pi_tuple))) > return BLK_STS_NOTSUPP; > Sure. > Although I have to admit I don't really understand what this check > is even trying to do. It basically checks for a namespace that has > a format with metadata that is not T10 protection information and > then rejects all I/O to it. Why are we even creating a block device > node for such a thing? Looking at the history (i) the check has changed location and (ii) some checks have been added through time. So it looks like leftovers from here and there. If we end up not needing these checks at all here, you can just fix it all in the same commit. Just wanted to get rid of sparse/smatch complains... --Apple-Mail=_00ED9334-FF4B-405C-86F1-B32963AAF0FF Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEm1mT7zen+vs9+T8kYx8FO3WZGMoFAln8aFgACgkQYx8FO3WZ GMq3vA//Ybut4701CVRq/hTAvrX/iZOjCFgblJwidezMKezMMA7NoprAJi6Yc3Da tN4BDv9w5kInmxndYVZ/QLs3Zhrxog4ZsPTU7M85k9xd2q4L65wT2EDAMnjudBrb 29Mt+8aG91p1NdqT0tifxIjBTNNDHry6HTgsHg56QVGaXhHdWvHI8UqNDVX4FzP0 LQISXbx6HiLj1qm3ZCcGohAbbV/kRPZaNwya8SIV/WuSDxSOjzMxqWUVtncHXn9O QAHPSxSzO2AyULfYQfC5Wy8xqO6fCxSBNFACBm4r60lQ0+U+sx2u0tWOnqSZr2cw atnfKKZyxGmB7gMLTbEW2+1S2FZluCAg4FQlaGPlm116IIrm3kGn3S4grkNF/IRf 4b7V84BuJBipYLcjdpIIR1C2YPguC17gxmfmt51cilWyNUyjKKZY6v+I3j4m6w7P 5MsP6FhqF7YcCEbCmJXv2fdzVhePa64PPXLaVtGxC1Yagb64gCiYlzzOb+yFkTzS PT02yMJK2yG7mZOe2S1FkWgI+tOk7L3tRGekH4RH7uJT82kn804QKR9qS1Ec3hS6 p/llf2KqtXC0DZti3N8jKYZzsNt8s9P6XMPWSWJvBMXZvIk0iPQr52n3soClZhuq H/qdM6lLuL0gb6TisorqJdntfutWMPsF/kHMn9WRV1LVUFmMPaI= =tDQQ -----END PGP SIGNATURE----- --Apple-Mail=_00ED9334-FF4B-405C-86F1-B32963AAF0FF-- From 1583049537204618505@xxx Fri Nov 03 12:54:45 +0000 2017 X-GM-THRID: 1583038799453206809 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread