Message ID | 20230621083823.1724337-5-p.raghav@samsung.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4217869vqr; Wed, 21 Jun 2023 01:55:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4XdPN0fjiqj+p6aNIYW4idZLvfw9TYJVlYk6QDth6P5NIY0DQ+wXHMz9q/mp9XG554zeAw X-Received: by 2002:a05:620a:2043:b0:762:43c0:b97b with SMTP id d3-20020a05620a204300b0076243c0b97bmr12754840qka.43.1687337753283; Wed, 21 Jun 2023 01:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687337753; cv=none; d=google.com; s=arc-20160816; b=h09t0bSClgtU5HGlRbQ5XqLA7mqEn1QBe+8iteu7/bTdjC2jj7pYS1Y39aEqdgaMZO J27jfgJ25hu6V3fUd9l+EfT4+jwP/7T337ZY2NehXK9rpNd5okrqw80+9oHUd8QYkoy6 QhH7xj/2+MG4uAYlTc7sK3AqeBC5Zo26awiluO3GWQjXGxAuhqZohbOaH9698HOofnnJ DqSCmCCjIsVoXtAFIuzohnsEbN3hlJjRWNUjhQa5XZLwHYMf1Q1qgyc3w3EXQfOpyAdg gi4/YmpPybiJcE2+uphw5oqUldzwxCWwvUDPB/pp9CsBurljVyMm8DbULomuhbKvFqBG WP8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :mime-version:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=w3WwCWATNZEjaxwXuvbzceRiaECoMo+kjp6czj94BZw=; b=Nl++7qUWQ2+TjGA4enRnf+Dzv2qXlsyGuoLmsQ1JSwDSblhZoQFC6WqVnrW+F/n6k+ dYZIMtNlgB8hLeFYQ6VldeqfeP5p3PtsQZvACVAnChLII1gf0ae2Rpy+OKMwhJK/VQPT HdQTH1HQxuEQdbmVffWz1+UBWt3leRS1JNHTkFsUlSADW2u2xVkHoFg/OWNO/0x179+2 yvK5ERjWj7JGwMfwsGJUKgmcB7zN0G5EoSmaxyrLNJ+bsTkqda3J/j/QauBRNqXItVnw o8cs2yjvNpA8CH0Asj819WpMKhEndDJHsaM4h06mIpvAdoJNZkk44EjYbKucTSYB93oA Wh5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=remuJAmv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t10-20020a056a00138a00b0066a4a09645dsi258533pfg.254.2023.06.21.01.55.34; Wed, 21 Jun 2023 01:55:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=remuJAmv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231140AbjFUIiy (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Wed, 21 Jun 2023 04:38:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231298AbjFUIih (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 21 Jun 2023 04:38:37 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BC1E1995 for <linux-kernel@vger.kernel.org>; Wed, 21 Jun 2023 01:38:33 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230621083830euoutp02ef327c5b62ff82e73717719369184214~qn8xstjp_0588605886euoutp02L for <linux-kernel@vger.kernel.org>; Wed, 21 Jun 2023 08:38:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230621083830euoutp02ef327c5b62ff82e73717719369184214~qn8xstjp_0588605886euoutp02L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1687336710; bh=w3WwCWATNZEjaxwXuvbzceRiaECoMo+kjp6czj94BZw=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=remuJAmv++xqADP0gSs92HnGKNaq2Ho0RzPzXAS95cXG0eJ+EuGJMr82vRUFpGnqH PlvAA6Ic4ui13UwsZLbo91cHjWy2OqIF438t8BDSv3y7C0d+2JQfpMIxRXr1wjyDwP uQPkjq2R/KCz2OQ+s3bAH8ML05vGiljTTO6QIiOE= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20230621083830eucas1p1bd1ed8b55bf02cbf0607171ae098f2fa~qn8xbeCsy1887218872eucas1p1g; Wed, 21 Jun 2023 08:38:30 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id A3.2A.42423.607B2946; Wed, 21 Jun 2023 09:38:30 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20230621083830eucas1p1c7e6ea9e23949a9688aac6f9f3ea25fb~qn8xMmChV2120721207eucas1p1m; Wed, 21 Jun 2023 08:38:30 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230621083830eusmtrp2960ddc217a12ea8b2ff7b9919f63eca4~qn8xL3wm80284602846eusmtrp2J; Wed, 21 Jun 2023 08:38:30 +0000 (GMT) X-AuditID: cbfec7f2-a3bff7000002a5b7-9d-6492b706ee14 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 1F.8B.14344.607B2946; Wed, 21 Jun 2023 09:38:30 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230621083829eusmtip28a5341bf537b3783377d1c6eea202609~qn8w_T4Qh2282222822eusmtip2R; Wed, 21 Jun 2023 08:38:29 +0000 (GMT) Received: from localhost (106.110.32.140) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 21 Jun 2023 09:38:29 +0100 From: Pankaj Raghav <p.raghav@samsung.com> To: <hare@suse.de>, <willy@infradead.org>, <david@fromorbit.com> CC: <gost.dev@samsung.com>, <mcgrof@kernel.org>, <hch@lst.de>, <jwong@kernel.org>, <linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Pankaj Raghav <p.raghav@samsung.com> Subject: [RFC 4/4] nvme: enable logical block size > PAGE_SIZE Date: Wed, 21 Jun 2023 10:38:23 +0200 Message-ID: <20230621083823.1724337-5-p.raghav@samsung.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230621083823.1724337-1-p.raghav@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [106.110.32.140] X-ClientProxiedBy: CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA02Se0hTYRjG+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yb37vh9zGV+un7nsnagSS3FGoqEWc1FxIgC+fEt3VAMA AA== X-CMS-MailID: 20230621083830eucas1p1c7e6ea9e23949a9688aac6f9f3ea25fb X-Msg-Generator: CA X-RootMTR: 20230621083830eucas1p1c7e6ea9e23949a9688aac6f9f3ea25fb X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230621083830eucas1p1c7e6ea9e23949a9688aac6f9f3ea25fb References: <20230621083823.1724337-1-p.raghav@samsung.com> <CGME20230621083830eucas1p1c7e6ea9e23949a9688aac6f9f3ea25fb@eucas1p1.samsung.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769301872237217571?= X-GMAIL-MSGID: =?utf-8?q?1769301872237217571?= |
Series | minimum folio order support in filemap | |
Commit Message
Pankaj Raghav
June 21, 2023, 8:38 a.m. UTC
Don't set the capacity to zero for when logical block size > PAGE_SIZE
as the block device with iomap aops support allocating block cache with
a minimum folio order.
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 6/21/23 10:38, Pankaj Raghav wrote: > Don't set the capacity to zero for when logical block size > PAGE_SIZE > as the block device with iomap aops support allocating block cache with > a minimum folio order. > > Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> > --- > drivers/nvme/host/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c > index 98bfb3d9c22a..36cf610f938c 100644 > --- a/drivers/nvme/host/core.c > +++ b/drivers/nvme/host/core.c > @@ -1886,7 +1886,7 @@ static void nvme_update_disk_info(struct gendisk *disk, > * The block layer can't support LBA sizes larger than the page size > * yet, so catch this early and don't allow block I/O. > */ > - if (ns->lba_shift > PAGE_SHIFT) { > + if ((ns->lba_shift > PAGE_SHIFT) && IS_ENABLED(CONFIG_BUFFER_HEAD)) { > capacity = 0; > bs = (1 << 9); > } Again, I can't see why this would be contingent on CONFIG_BUFFER_HEAD. I'll be rebasing my patchset on your mapping_set_orders() patches and repost. Cheers, Hannes
On 2023-06-21 11:07, Hannes Reinecke wrote: > On 6/21/23 10:38, Pankaj Raghav wrote: >> Don't set the capacity to zero for when logical block size > PAGE_SIZE >> as the block device with iomap aops support allocating block cache with >> a minimum folio order. >> >> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> >> --- >> drivers/nvme/host/core.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c >> index 98bfb3d9c22a..36cf610f938c 100644 >> --- a/drivers/nvme/host/core.c >> +++ b/drivers/nvme/host/core.c >> @@ -1886,7 +1886,7 @@ static void nvme_update_disk_info(struct gendisk *disk, >> * The block layer can't support LBA sizes larger than the page size >> * yet, so catch this early and don't allow block I/O. >> */ >> - if (ns->lba_shift > PAGE_SHIFT) { >> + if ((ns->lba_shift > PAGE_SHIFT) && IS_ENABLED(CONFIG_BUFFER_HEAD)) { >> capacity = 0; >> bs = (1 << 9); >> } > Again, I can't see why this would be contingent on CONFIG_BUFFER_HEAD. > I'll be rebasing my patchset on your mapping_set_orders() patches and repost. > As I explained in the previous email, I get a BUG from buffer.c when I don't make it conditional. The hope is when we move to iomap based aops for the block cache, we can just get rid of `if (ns->lba_shift > PAGE_SHIFT)` block and no dependence on CONFIG_BUFFER_HEAD. > Cheers, > > Hannes >
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 98bfb3d9c22a..36cf610f938c 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1886,7 +1886,7 @@ static void nvme_update_disk_info(struct gendisk *disk, * The block layer can't support LBA sizes larger than the page size * yet, so catch this early and don't allow block I/O. */ - if (ns->lba_shift > PAGE_SHIFT) { + if ((ns->lba_shift > PAGE_SHIFT) && IS_ENABLED(CONFIG_BUFFER_HEAD)) { capacity = 0; bs = (1 << 9); }