From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA308C433E0 for ; Thu, 14 Jan 2021 17:44:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A52FE23B40 for ; Thu, 14 Jan 2021 17:44:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727679AbhANRn4 (ORCPT ); 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.