From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EAD581849 for ; Mon, 11 Apr 2022 14:01:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60E77C385A4; Mon, 11 Apr 2022 14:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649685706; bh=aoF5JI4oA+WPgt/y0IgsxtsbxAXaCuGafPntNOloKP4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z3DJooO+lpgxb0V7M65iVrqmxI0PEssCJPh+vJ1dEw1YBTDUO4k0Ftowa06gEpR83 S1WtT+TAlqYOA3SV5oPOUKBv5r5Czq1jXlmgnBC2vlAsKUSP12Z7m3WPk2IIXa7ddE 7+rat37phwTAQkXhdDcOfyIkaP50hX9uWu9MCv3Yv354dhMqhNyhEKK5VIXvkcNSo/ Yw75O5ZXcRgYxwAIHqrZej/c3adf+HQOwXoAdC34I68eRF5zbda1Ysdnlbmc/q5KXa +yAvml8INLRMKi4FRTZn17313igwH9BKq1x7zfZpQGp7kDf9WzbZnpQOZP3oofxBEN wCj97MUpv05qA== Date: Mon, 11 Apr 2022 08:01:41 -0600 From: Keith Busch To: Christoph Hellwig Cc: Jens Axboe , dm-devel@redhat.com, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-um@lists.infradead.org, linux-block@vger.kernel.org, drbd-dev@lists.linbit.com, nbd@other.debian.org, ceph-devel@vger.kernel.org, virtualization@lists.linux-foundation.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, linux-nvme@lists.infradead.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, jfs-discussion@lists.sourceforge.net, linux-nilfs@vger.kernel.org, ntfs3@lists.linux.dev, ocfs2-devel@oss.oracle.com, linux-mm@kvack.org, "Martin K . Petersen" , Christoph =?iso-8859-1?Q?B=F6hmwalder?= , Coly Li Subject: Re: [PATCH 24/27] block: remove QUEUE_FLAG_DISCARD Message-ID: References: <20220409045043.23593-1-hch@lst.de> <20220409045043.23593-25-hch@lst.de> Precedence: bulk X-Mailing-List: ntfs3@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220409045043.23593-25-hch@lst.de> On Sat, Apr 09, 2022 at 06:50:40AM +0200, Christoph Hellwig wrote: > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c > index efb85c6d8e2d5..7e07dd69262a7 100644 > --- a/drivers/nvme/host/core.c > +++ b/drivers/nvme/host/core.c > @@ -1607,10 +1607,8 @@ static void nvme_config_discard(struct gendisk *disk, struct nvme_ns *ns) > struct request_queue *queue = disk->queue; > u32 size = queue_logical_block_size(queue); > > - if (ctrl->max_discard_sectors == 0) { > - blk_queue_flag_clear(QUEUE_FLAG_DISCARD, queue); > + if (ctrl->max_discard_sectors == 0) > return; > - } I think we need to update the queue limit in this condition. While unlikley, the flag was cleared here in case the device changed support for discard from the previous reset. 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 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7DA5BC4167B for ; Mon, 11 Apr 2022 14:02:01 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nducD-0005KE-7W; Mon, 11 Apr 2022 14:01:59 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nducB-0005K4-Vb; Mon, 11 Apr 2022 14:01:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=DI0ZRwil3ILS6ylQX8YRjna3F0HIaHCXA8EcPjMP57c=; b=j2hgMvmgUgLhAIDpzzSN0XONC3 iIpu99S2crNQlWl25qRDMylU5WYoPUeRPrAV5cDUeofrywfYg9NAhx74XA/PlXWQJn80QwFmh+tlM JCLjSjkERLyl48DN92fAgD3UXcqvex2s29uq8VIrzXpKmevAycItuECXPshBQubfaNHY=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=DI0ZRwil3ILS6ylQX8YRjna3F0HIaHCXA8EcPjMP57c=; b=PnafaAhAkZ0LXXqkupeJjRnxLs hEDoHPAL6yGEXkEPBnB7uwbbRFqnR10BgW14eSx4S22Hw6bMifFHqGLyPPer2DD/TAOzvJD8Jd20A IPukVI7BsJROp4sxCbxZIl9M92O7CvGwNqaAc5OLgXu+zoql7RT3gcYq6cBy4gWGpDO8=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.94.2) id 1nduc9-00Cmsv-PA; Mon, 11 Apr 2022 14:01:58 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3B15B6125C; Mon, 11 Apr 2022 14:01:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60E77C385A4; Mon, 11 Apr 2022 14:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649685706; bh=aoF5JI4oA+WPgt/y0IgsxtsbxAXaCuGafPntNOloKP4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z3DJooO+lpgxb0V7M65iVrqmxI0PEssCJPh+vJ1dEw1YBTDUO4k0Ftowa06gEpR83 S1WtT+TAlqYOA3SV5oPOUKBv5r5Czq1jXlmgnBC2vlAsKUSP12Z7m3WPk2IIXa7ddE 7+rat37phwTAQkXhdDcOfyIkaP50hX9uWu9MCv3Yv354dhMqhNyhEKK5VIXvkcNSo/ Yw75O5ZXcRgYxwAIHqrZej/c3adf+HQOwXoAdC34I68eRF5zbda1Ysdnlbmc/q5KXa +yAvml8INLRMKi4FRTZn17313igwH9BKq1x7zfZpQGp7kDf9WzbZnpQOZP3oofxBEN wCj97MUpv05qA== Date: Mon, 11 Apr 2022 08:01:41 -0600 From: Keith Busch To: Christoph Hellwig Message-ID: References: <20220409045043.23593-1-hch@lst.de> <20220409045043.23593-25-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220409045043.23593-25-hch@lst.de> X-Headers-End: 1nduc9-00Cmsv-PA Subject: Re: [f2fs-dev] [PATCH 24/27] block: remove QUEUE_FLAG_DISCARD X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jfs-discussion@lists.sourceforge.net, linux-nvme@lists.infradead.org, virtualization@lists.linux-foundation.org, linux-mm@kvack.org, dm-devel@redhat.com, target-devel@vger.kernel.org, linux-mtd@lists.infradead.org, drbd-dev@lists.linbit.com, linux-s390@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-scsi@vger.kernel.org, cluster-devel@redhat.com, xen-devel@lists.xenproject.org, linux-ext4@vger.kernel.org, linux-um@lists.infradead.org, nbd@other.debian.org, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, ceph-devel@vger.kernel.org, Coly Li , Jens Axboe , linux-raid@vger.kernel.org, "Martin K . Petersen" , linux-mmc@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, Christoph =?iso-8859-1?Q?B=F6hmwalder?= , ocfs2-devel@oss.oracle.com, linux-fsdevel@vger.kernel.org, ntfs3@lists.linux.dev, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Sat, Apr 09, 2022 at 06:50:40AM +0200, Christoph Hellwig wrote: > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c > index efb85c6d8e2d5..7e07dd69262a7 100644 > --- a/drivers/nvme/host/core.c > +++ b/drivers/nvme/host/core.c > @@ -1607,10 +1607,8 @@ static void nvme_config_discard(struct gendisk *disk, struct nvme_ns *ns) > struct request_queue *queue = disk->queue; > u32 size = queue_logical_block_size(queue); > > - if (ctrl->max_discard_sectors == 0) { > - blk_queue_flag_clear(QUEUE_FLAG_DISCARD, queue); > + if (ctrl->max_discard_sectors == 0) > return; > - } I think we need to update the queue limit in this condition. While unlikley, the flag was cleared here in case the device changed support for discard from the previous reset. _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8551CC433F5 for ; Mon, 11 Apr 2022 14:02:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VeS46z1VeKrizhkiyWgv7487i76huaKvgkk/LOltBwI=; b=MdbLTOe/fLrCzl Yfg9XL+xqtzz5nXscqjVjjjc3Fa9bZwpOuHKXZLrN1bhi9GjMrxBNAw4PHSkQ1lcmNtQVztm0IxZ/ 77ojX5EpMZ/BRkDnjrqIYvBhktHaMWuOe80KBR6osigDI+BDIRbjzuvicgBoVlAq9665/iF8zl+87 ZDfrhG88FSKZYeLrT5TG4cvGiKB1z0MhaRLu+atEh6QhnafXWTvusYMaTDGTxVXbW3GP9cDj5aPLS fUwUGgC/a5CatSyNuTMd9B+ebtp66At3549p3A7KNUDuuREy1vIbet3U8rUx97Gw/77xGMbrLqHVz QWVLSpJHd0H+YrNbsumQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nduc3-009GOe-8B; Mon, 11 Apr 2022 14:01:51 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nduc0-009GNc-ED; Mon, 11 Apr 2022 14:01:49 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3B15B6125C; Mon, 11 Apr 2022 14:01:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60E77C385A4; Mon, 11 Apr 2022 14:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649685706; bh=aoF5JI4oA+WPgt/y0IgsxtsbxAXaCuGafPntNOloKP4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z3DJooO+lpgxb0V7M65iVrqmxI0PEssCJPh+vJ1dEw1YBTDUO4k0Ftowa06gEpR83 S1WtT+TAlqYOA3SV5oPOUKBv5r5Czq1jXlmgnBC2vlAsKUSP12Z7m3WPk2IIXa7ddE 7+rat37phwTAQkXhdDcOfyIkaP50hX9uWu9MCv3Yv354dhMqhNyhEKK5VIXvkcNSo/ Yw75O5ZXcRgYxwAIHqrZej/c3adf+HQOwXoAdC34I68eRF5zbda1Ysdnlbmc/q5KXa +yAvml8INLRMKi4FRTZn17313igwH9BKq1x7zfZpQGp7kDf9WzbZnpQOZP3oofxBEN wCj97MUpv05qA== Date: Mon, 11 Apr 2022 08:01:41 -0600 From: Keith Busch To: Christoph Hellwig Cc: Jens Axboe , dm-devel@redhat.com, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-um@lists.infradead.org, linux-block@vger.kernel.org, drbd-dev@lists.linbit.com, nbd@other.debian.org, ceph-devel@vger.kernel.org, virtualization@lists.linux-foundation.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, linux-nvme@lists.infradead.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, jfs-discussion@lists.sourceforge.net, linux-nilfs@vger.kernel.org, ntfs3@lists.linux.dev, ocfs2-devel@oss.oracle.com, linux-mm@kvack.org, "Martin K . Petersen" , Christoph =?iso-8859-1?Q?B=F6hmwalder?= , Coly Li Subject: Re: [PATCH 24/27] block: remove QUEUE_FLAG_DISCARD Message-ID: References: <20220409045043.23593-1-hch@lst.de> <20220409045043.23593-25-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220409045043.23593-25-hch@lst.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220411_070148_552049_CC7BC724 X-CRM114-Status: GOOD ( 14.92 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On Sat, Apr 09, 2022 at 06:50:40AM +0200, Christoph Hellwig wrote: > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c > index efb85c6d8e2d5..7e07dd69262a7 100644 > --- a/drivers/nvme/host/core.c > +++ b/drivers/nvme/host/core.c > @@ -1607,10 +1607,8 @@ static void nvme_config_discard(struct gendisk *disk, struct nvme_ns *ns) > struct request_queue *queue = disk->queue; > u32 size = queue_logical_block_size(queue); > > - if (ctrl->max_discard_sectors == 0) { > - blk_queue_flag_clear(QUEUE_FLAG_DISCARD, queue); > + if (ctrl->max_discard_sectors == 0) > return; > - } I think we need to update the queue limit in this condition. While unlikley, the flag was cleared here in case the device changed support for discard from the previous reset. ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ 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 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3D4A0C433EF for ; Tue, 12 Apr 2022 07:06:18 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-403-mAYGlYAnNEaLxNkmZSvBiQ-1; Tue, 12 Apr 2022 03:06:16 -0400 X-MC-Unique: mAYGlYAnNEaLxNkmZSvBiQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AB26D805F75; Tue, 12 Apr 2022 07:06:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5934740CFD05; Tue, 12 Apr 2022 07:06:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6B039193F6EC; Tue, 12 Apr 2022 07:06:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 362FF19466DF for ; Mon, 11 Apr 2022 14:12:33 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 274BDC202C8; Mon, 11 Apr 2022 14:12:33 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast08.extmail.prod.ext.rdu2.redhat.com [10.11.55.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 236D2C44B18 for ; Mon, 11 Apr 2022 14:12:33 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 06BDD382054E for ; Mon, 11 Apr 2022 14:12:33 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-259-9aYVibjiO9yHQvbGVctUJg-1; Mon, 11 Apr 2022 10:12:29 -0400 X-MC-Unique: 9aYVibjiO9yHQvbGVctUJg-1 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3B15B6125C; Mon, 11 Apr 2022 14:01:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60E77C385A4; Mon, 11 Apr 2022 14:01:44 +0000 (UTC) Date: Mon, 11 Apr 2022 08:01:41 -0600 From: Keith Busch To: Christoph Hellwig Message-ID: References: <20220409045043.23593-1-hch@lst.de> <20220409045043.23593-25-hch@lst.de> MIME-Version: 1.0 In-Reply-To: <20220409045043.23593-25-hch@lst.de> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-Mailman-Approved-At: Tue, 12 Apr 2022 07:06:10 +0000 Subject: Re: [dm-devel] [PATCH 24/27] block: remove QUEUE_FLAG_DISCARD X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jfs-discussion@lists.sourceforge.net, linux-nvme@lists.infradead.org, virtualization@lists.linux-foundation.org, linux-mm@kvack.org, dm-devel@redhat.com, target-devel@vger.kernel.org, linux-mtd@lists.infradead.org, drbd-dev@lists.linbit.com, linux-s390@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-scsi@vger.kernel.org, cluster-devel@redhat.com, xen-devel@lists.xenproject.org, linux-ext4@vger.kernel.org, linux-um@lists.infradead.org, nbd@other.debian.org, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, ceph-devel@vger.kernel.org, Coly Li , Jens Axboe , linux-raid@vger.kernel.org, "Martin K . Petersen" , linux-mmc@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, Christoph =?iso-8859-1?Q?B=F6hmwalder?= , ocfs2-devel@oss.oracle.com, linux-fsdevel@vger.kernel.org, ntfs3@lists.linux.dev, linux-btrfs@vger.kernel.org Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Sat, Apr 09, 2022 at 06:50:40AM +0200, Christoph Hellwig wrote: > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c > index efb85c6d8e2d5..7e07dd69262a7 100644 > --- a/drivers/nvme/host/core.c > +++ b/drivers/nvme/host/core.c > @@ -1607,10 +1607,8 @@ static void nvme_config_discard(struct gendisk *disk, struct nvme_ns *ns) > struct request_queue *queue = disk->queue; > u32 size = queue_logical_block_size(queue); > > - if (ctrl->max_discard_sectors == 0) { > - blk_queue_flag_clear(QUEUE_FLAG_DISCARD, queue); > + if (ctrl->max_discard_sectors == 0) > return; > - } I think we need to update the queue limit in this condition. While unlikley, the flag was cleared here in case the device changed support for discard from the previous reset. -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 11 Apr 2022 08:01:41 -0600 From: Keith Busch Subject: Re: [PATCH 24/27] block: remove QUEUE_FLAG_DISCARD Message-ID: References: <20220409045043.23593-1-hch@lst.de> <20220409045043.23593-25-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220409045043.23593-25-hch@lst.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org To: Christoph Hellwig Cc: Jens Axboe , dm-devel@redhat.com, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-um@lists.infradead.org, linux-block@vger.kernel.org, drbd-dev@lists.linbit.com, nbd@other.debian.org, ceph-devel@vger.kernel.org, virtualization@lists.linux-foundation.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, linux-nvme@lists.infradead.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, jfs-discussion@lists.sourceforge.net, linux-nilfs@vger.kernel.org, ntfs3@lists.linux.dev, ocfs2-devel@oss.oracle.com, linux-mm@kvack.org, "Martin K . Petersen" , Christoph =?iso-8859-1?Q?B=F6hmwalder?= , Coly Li On Sat, Apr 09, 2022 at 06:50:40AM +0200, Christoph Hellwig wrote: > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c > index efb85c6d8e2d5..7e07dd69262a7 100644 > --- a/drivers/nvme/host/core.c > +++ b/drivers/nvme/host/core.c > @@ -1607,10 +1607,8 @@ static void nvme_config_discard(struct gendisk *disk, struct nvme_ns *ns) > struct request_queue *queue = disk->queue; > u32 size = queue_logical_block_size(queue); > > - if (ctrl->max_discard_sectors == 0) { > - blk_queue_flag_clear(QUEUE_FLAG_DISCARD, queue); > + if (ctrl->max_discard_sectors == 0) > return; > - } I think we need to update the queue limit in this condition. While unlikley, the flag was cleared here in case the device changed support for discard from the previous reset. _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Busch Date: Mon, 11 Apr 2022 08:01:41 -0600 Subject: [Cluster-devel] [PATCH 24/27] block: remove QUEUE_FLAG_DISCARD In-Reply-To: <20220409045043.23593-25-hch@lst.de> References: <20220409045043.23593-1-hch@lst.de> <20220409045043.23593-25-hch@lst.de> Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Sat, Apr 09, 2022 at 06:50:40AM +0200, Christoph Hellwig wrote: > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c > index efb85c6d8e2d5..7e07dd69262a7 100644 > --- a/drivers/nvme/host/core.c > +++ b/drivers/nvme/host/core.c > @@ -1607,10 +1607,8 @@ static void nvme_config_discard(struct gendisk *disk, struct nvme_ns *ns) > struct request_queue *queue = disk->queue; > u32 size = queue_logical_block_size(queue); > > - if (ctrl->max_discard_sectors == 0) { > - blk_queue_flag_clear(QUEUE_FLAG_DISCARD, queue); > + if (ctrl->max_discard_sectors == 0) > return; > - } I think we need to update the queue limit in this condition. While unlikley, the flag was cleared here in case the device changed support for discard from the previous reset. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Busch Subject: Re: [PATCH 24/27] block: remove QUEUE_FLAG_DISCARD Date: Mon, 11 Apr 2022 08:01:41 -0600 Message-ID: References: <20220409045043.23593-1-hch@lst.de> <20220409045043.23593-25-hch@lst.de> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649685706; bh=aoF5JI4oA+WPgt/y0IgsxtsbxAXaCuGafPntNOloKP4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z3DJooO+lpgxb0V7M65iVrqmxI0PEssCJPh+vJ1dEw1YBTDUO4k0Ftowa06gEpR83 S1WtT+TAlqYOA3SV5oPOUKBv5r5Czq1jXlmgnBC2vlAsKUSP12Z7m3WPk2IIXa7ddE 7+rat37phwTAQkXhdDcOfyIkaP50hX9uWu9MCv3Yv354dhMqhNyhEKK5VIXvkcNSo/ Yw75O5ZXcRgYxwAIHqrZej/c3adf+HQOwXoAdC34I68eRF5zbda1Ysdnlbmc/q5KXa +yAvml8INLRMKi4FRTZn17313igwH9BKq1x7zfZpQGp7kDf9WzbZnpQOZP3oofxBEN wCj97MUpv05qA== Content-Disposition: inline In-Reply-To: <20220409045043.23593-25-hch@lst.de> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Christoph Hellwig Cc: Jens Axboe , dm-devel@redhat.com, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-um@lists.infradead.org, linux-block@vger.kernel.org, drbd-dev@lists.linbit.com, nbd@other.debian.org, ceph-devel@vger.kernel.org, virtualization@lists.linux-foundation.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, linux-nvme@lists.infradead.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, jfs-discussion@lists.sourceforge.net, linux-nilfs@vger.kernel.org, ntfs3@lists.linux.dev, ocfs2-devel@oss.o On Sat, Apr 09, 2022 at 06:50:40AM +0200, Christoph Hellwig wrote: > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c > index efb85c6d8e2d5..7e07dd69262a7 100644 > --- a/drivers/nvme/host/core.c > +++ b/drivers/nvme/host/core.c > @@ -1607,10 +1607,8 @@ static void nvme_config_discard(struct gendisk *disk, struct nvme_ns *ns) > struct request_queue *queue = disk->queue; > u32 size = queue_logical_block_size(queue); > > - if (ctrl->max_discard_sectors == 0) { > - blk_queue_flag_clear(QUEUE_FLAG_DISCARD, queue); > + if (ctrl->max_discard_sectors == 0) > return; > - } I think we need to update the queue limit in this condition. While unlikley, the flag was cleared here in case the device changed support for discard from the previous reset.