Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp453755pxb; Thu, 14 Jan 2021 09:48:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyb3TwPmalhyODMXbHGwuA6NA5SXJYtPrh4FbosD7iaP9B1WIVWiWgBk9ju5L0QtKLSpYg+ X-Received: by 2002:a05:6402:2553:: with SMTP id l19mr6456283edb.326.1610646489069; Thu, 14 Jan 2021 09:48:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610646489; cv=none; d=google.com; s=arc-20160816; b=vGbWQ8tH08/VC8fEyA4iR7Cpz+5ayo/LYzpxrwGaTxVnT296WIXuhVHrdFkM6me1UM dwZGxTVeFw/L7rTOrbq+xPEtUXoJqL8e9D+Q/AmqfEbWzxE+UVkSnELEx5S00EoVA3Ty PC8bAIPhfjo8+H2SyFSaN9zq2CT8bu3p0YlzKkwVjxlJ9LozXpvbfXiKrLZJETIVaP3F EbKHir0GzqsZ/rP7mBo90KIdoJT2OmNE9i/2v86kyY2vMwByFBEecAAH8JPv5U1Emd43 8zuBJ9LdIMG+LoyLgMzqw8wJA/hxQZeIjOqvhMMh09nTJCcEnFKf7sy6YgfAuvoha7Hw T/YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ef4BjNDeY7HXD17zp5Ubsnme7e+XEsiEyHxD3HB03cw=; b=oHx5xNcSnK6Gf8CeTipzFG6LPMSoEOVhMcbDRVk0tobc78I13MeFC2cOnrxIUtEEKG HRmDGQS/Ud0dWtQ7lRF0+S+r/hJUpxV/b70jJHP959ODGAi5r7SlfDtAnWKSmem+GA/K ZsPJRg3R5U9QD6dyfC3IN6WZw+/AtpcJEYica6k0Nellyjp0Wt02QPopgbo/TM1mOkdQ v78R1sYbon9zexGLURWrzjARTZXIvTSj2RpuktcI0TnX6ksAwuw1YeRxNFdmcSaERoI/ Ny/tmFqLpOH9HmJC9RSzr4qnPC3PXgkkN9/hbLBN1YwAKdBvBKiq0XiKDfKjntbQxwpp Y3wg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o18si2030782ejm.737.2021.01.14.09.47.45; Thu, 14 Jan 2021 09:48:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727608AbhANRn4 (ORCPT + 99 others); Thu, 14 Jan 2021 12:43:56 -0500 Received: from verein.lst.de ([213.95.11.211]:36786 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726147AbhANRn4 (ORCPT ); Thu, 14 Jan 2021 12:43:56 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id A3DC568B02; Thu, 14 Jan 2021 18:43:12 +0100 (CET) Date: Thu, 14 Jan 2021 18:43:11 +0100 From: Christoph Hellwig To: Sagi Grimberg Cc: Johannes Thumshirn , Li Feng , "martin.petersen@oracle.com" , Keith Busch , Jens Axboe , Christoph Hellwig , "open list:NVM EXPRESS DRIVER" , open list , "lifeng1519@gmail.com" Subject: Re: [PATCH] nvme: reject the ns when the block size is smaller than a sector Message-ID: <20210114174311.GB31188@lst.de> References: <20210113160621.98615-1-fengli@smartx.com> <87698545-de26-c0ca-01e9-4dc2ddcacc80@grimberg.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87698545-de26-c0ca-01e9-4dc2ddcacc80@grimberg.me> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 13, 2021 at 02:12:59PM -0800, Sagi Grimberg wrote: >> But this only catches a physical block size < 512 for NVMe, not any other block device. >> >> Please fix it for the general case in blk_queue_physical_block_size(). > > We actually call that later and would probably be better to check here.. We had a series for that a short while ago that got lost.