Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp38421pxb; Mon, 11 Apr 2022 18:09:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNWzLWYBbCyOr6U5FFuIIqQETczLCSUFT8svaBBSABplWfvSDqXFYCM2e8iaCev6nNhpvi X-Received: by 2002:a62:f20d:0:b0:505:6ec8:4ee6 with SMTP id m13-20020a62f20d000000b005056ec84ee6mr22833533pfh.5.1649725752419; Mon, 11 Apr 2022 18:09:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649725752; cv=none; d=google.com; s=arc-20160816; b=nxAZ5iGX6r9bSdG0gF/qEGw/JYCiVqLfcuOoGRO6Q9ft6YVazF2fMwT/SqIp30YTes xTJB6XYXUecV6BLiKmLap6sOFBXK249on2ckRtXtSLBM3WKKIIa8xR3hwUCESGfqJfmb nj5wSOMMxAD4gfIclx9h3RYT50fEdmKGHHz02eMsyuMYqGhD/JHBYLr0iQYMRheB7eHS MioI/eYrCIDNLxozwFjOybfoxaEPjk4HxKLa5mbwRa0D99zOe9D/J+dYEbdCR560Sx+K 6gqcD3ATnt0tGsqvaWHyUQiCACzlIXNrB8Iw2l71x5HkGZHFrax+YjQ84Gfb6FaYsPA4 OQGQ== 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-transfer-encoding :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=0RiNf7uoJjg1rRFObzVZQSCMAd1nof/h0vLpUgMcwvY=; b=VZG6gdbt+1Ot81pJrrMOkAQsllUyj+EacgIYilYw/hFPpNonxAWuTFHCnVBB+tGgYk G4JnjfJGiBl7R50w+Gn/txQqJixyEIB65zQwit58ich+OmlzET++G0NpFSGWmlWu9OIT 2oSjm4YMnxUzNkUMVC5qGGgt7YGCHTBdM4rH9cMU5cu/flrrFhxNXbpcl3803ySo/d9h cYT3X8hY+V2oL/nR3W/Hb0p5otC/i9QZl+JN2HrcQP7G74OoE5/UoPmbXbUbs5M0PRS9 8dTHhnJPIR74qNr6sUdgnQdknC1Kc8AvipYblihtwqChMUelMRRNlHidgY2DbMpv8qrf yMZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=tfXHkMaj; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x2-20020a17090ab00200b001c65ad33fe0si13184844pjq.92.2022.04.11.18.08.43; Mon, 11 Apr 2022 18:09:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=@suse.cz header.s=susede2_rsa header.b=tfXHkMaj; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346302AbiDKRap (ORCPT + 99 others); Mon, 11 Apr 2022 13:30:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233809AbiDKRan (ORCPT ); Mon, 11 Apr 2022 13:30:43 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37AD32982C; Mon, 11 Apr 2022 10:28:28 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id ABD701F7AD; Mon, 11 Apr 2022 17:28:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649698106; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0RiNf7uoJjg1rRFObzVZQSCMAd1nof/h0vLpUgMcwvY=; b=tfXHkMaj5kpUcLtvBYnwRGxDxcXmodIyKTVNxARm8whPlAkOVHL3pBXy48YlCR99uput93 ek64inXcfBYSt9NuV9MWohA/Liu5eXfW+58ujnwevThluScwhFajBAp+/PR+hCYJW8ogrY iu/7/TOOXGQ1NMcWDFWaoeOCSwaX7H0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649698106; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0RiNf7uoJjg1rRFObzVZQSCMAd1nof/h0vLpUgMcwvY=; b=y/QeT70zXSjm5PP3weiVBlhCkwkEL69tQO+HTTi+7j+oI3RtiZJDs5egZuujl2LcaWZ24F apjvnh1HQMyDZeAA== Received: from ds.suse.cz (ds.suse.cz [10.100.12.205]) by relay2.suse.de (Postfix) with ESMTP id 775CCA3B82; Mon, 11 Apr 2022 17:28:26 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 0F66CDA7F7; Mon, 11 Apr 2022 19:24:22 +0200 (CEST) Date: Mon, 11 Apr 2022 19:24:21 +0200 From: David Sterba 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: <20220411172421.GU15609@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Christoph Hellwig , 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 References: <20220409045043.23593-1-hch@lst.de> <20220409045043.23593-25-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220409045043.23593-25-hch@lst.de> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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: X-Mailing-List: linux-ext4@vger.kernel.org On Sat, Apr 09, 2022 at 06:50:40AM +0200, Christoph Hellwig wrote: > Just use a non-zero max_discard_sectors as an indicator for discard > support, similar to what is done for write zeroes. > > The only places where needs special attention is the RAID5 driver, > which must clear discard support for security reasons by default, > even if the default stacking rules would allow for it. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Martin K. Petersen > Acked-by: Christoph B?hmwalder [btrfs] > Acked-by: Coly Li [bcache] > --- > arch/um/drivers/ubd_kern.c | 2 -- > block/blk-core.c | 2 +- > block/blk-lib.c | 2 +- > block/blk-mq-debugfs.c | 1 - > block/ioctl.c | 3 +-- > drivers/block/drbd/drbd_main.c | 2 +- > drivers/block/drbd/drbd_nl.c | 19 ++----------------- > drivers/block/drbd/drbd_receiver.c | 3 +-- > drivers/block/loop.c | 11 +++-------- > drivers/block/nbd.c | 5 +---- > drivers/block/null_blk/main.c | 1 - > drivers/block/rbd.c | 1 - > drivers/block/rnbd/rnbd-clt.c | 2 -- > drivers/block/rnbd/rnbd-srv-dev.h | 3 --- > drivers/block/virtio_blk.c | 2 -- > drivers/block/xen-blkback/xenbus.c | 2 +- > drivers/block/xen-blkfront.c | 2 -- > drivers/block/zram/zram_drv.c | 1 - > drivers/md/bcache/request.c | 4 ++-- > drivers/md/bcache/super.c | 3 +-- > drivers/md/bcache/sysfs.c | 2 +- > drivers/md/dm-cache-target.c | 9 +-------- > drivers/md/dm-clone-target.c | 9 +-------- > drivers/md/dm-log-writes.c | 3 +-- > drivers/md/dm-raid.c | 9 ++------- > drivers/md/dm-table.c | 9 ++------- > drivers/md/dm-thin.c | 11 +---------- > drivers/md/dm.c | 3 +-- > drivers/md/md-linear.c | 11 +---------- > drivers/md/raid0.c | 7 ------- > drivers/md/raid1.c | 16 +--------------- > drivers/md/raid10.c | 18 ++---------------- > drivers/md/raid5-cache.c | 2 +- > drivers/md/raid5.c | 12 ++++-------- > drivers/mmc/core/queue.c | 1 - > drivers/mtd/mtd_blkdevs.c | 1 - > drivers/nvme/host/core.c | 6 ++---- > drivers/s390/block/dasd_fba.c | 1 - > drivers/scsi/sd.c | 2 -- > drivers/target/target_core_device.c | 2 +- For > fs/btrfs/extent-tree.c | 4 ++-- > fs/btrfs/ioctl.c | 2 +- Acked-by: David Sterba