Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp34110lfe; Fri, 15 Apr 2022 18:07:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrt444L7+QoqqNqq/g3Sy9qZCGGVEW+2IAK1mpEOCMPu+T0mUbWp8MAjx5oYB9CSzPA8Wf X-Received: by 2002:a17:90b:1c8e:b0:1bf:364c:dd7a with SMTP id oo14-20020a17090b1c8e00b001bf364cdd7amr1544368pjb.103.1650071279210; Fri, 15 Apr 2022 18:07:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650071279; cv=none; d=google.com; s=arc-20160816; b=NsQcS6RZF3gKVNy4U9hQytixc/cS7CFW2ak2Wt0q0mNrrI7SPH1s916pNehRFM5dIf QOvTxJhP2tsxFwNwlHuP3qQFO9Ba6eKOHUiPGOk8lE/irniEK85jNfv8W189OuKGLYz0 qrInmd69vk4gc+k8KKHUhXU0oYcrYxOErf1YH914yiLmL0EzKWlfa/iFaA7NMrYJP/UH HKbk5hnOYjfK8T3WvDhIs0Esq/pIQfG4yicaacryg1hxOowG/OuX2c4Edxh4v1nP+MOa erGhGHGFKdBrzXe6ua62t7Cpnk8pc6Mpy4YUONt0rEBo6YZtpbNFMPq22UVSu8wDkwZA u99g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UUS6y6SVPRCfJmQVPGCeD5o714qtaTT6EGogPxQdIy8=; b=dXoFzdlsaaGK61Sl9gjuMOMKULyNyGxo/gX1lR+NK8MnXot7FEAruO8C07wXlaLs94 u9NRvWZWpq6Dpn1J78O2tWFaorpt2ZlkMCBp0jXttjv1pePxPHDJghToAnYCcVxgKhKr 3cGNwSZWZe7z9oOwfstH/Q4Nhb1NYJpwlZibl/ZmcZBD2j3A5omWz4tPzIe5BieUf+S6 ueXhp86p/rLkdPb/bwp8COldvKNWFrgz1TTDFwGzWydF4fJ1WB+EmdTv1KmrJEIN8+sZ 9Rexx1jj1Q/kCXH9JniCbs6GjOvoPbpT63PFAL8/F90IpRSqROc+oanZmqgFQ9YdnjBf t8iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=x5agUVGS; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q18-20020a170902c75200b00153f163b3c6si2303121plq.552.2022.04.15.18.07.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:07:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=x5agUVGS; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 206DBE3894; Fri, 15 Apr 2022 17:48:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349482AbiDOEzv (ORCPT + 99 others); Fri, 15 Apr 2022 00:55:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233203AbiDOEzo (ORCPT ); Fri, 15 Apr 2022 00:55:44 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39F486A42B; Thu, 14 Apr 2022 21:53:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=UUS6y6SVPRCfJmQVPGCeD5o714qtaTT6EGogPxQdIy8=; b=x5agUVGSt4qUPiArfFruXQZEkh ED5eIR3aSkNtXX7nLmypr4HghgJKhQCB8SBb7JsEb44bJsx67U0AujP5aBa1btb0b+S+xGwgwPD/7 RRQm+W0tVsP/DSqW5U9c8tVIT1qiiaD3HIowj1Lt7t2v4nBRlePLOFKu6cvzlYV9ePp50Bne//9CJ umsrwM4RvhODoSk65phqK4ewBHRrL/nBunRhsHvf5+9CdNnqhx6U7RpMnn5jES/jOpBFGw0/3/808 G3CmRXGpdyxJMHizR5B5MMLpxywFyHZzcVohmA18ECgaE440XvejvcNkIHffvwRVbT/cfUPwhLobO l5t6lMLg==; Received: from [2a02:1205:504b:4280:f5dd:42a4:896c:d877] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfDxL-008Omo-Q5; Fri, 15 Apr 2022 04:53:16 +0000 From: Christoph Hellwig To: Jens Axboe Cc: 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" Subject: [PATCH 01/27] target: remove an incorrect unmap zeroes data deduction Date: Fri, 15 Apr 2022 06:52:32 +0200 Message-Id: <20220415045258.199825-2-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220415045258.199825-1-hch@lst.de> References: <20220415045258.199825-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 For block devices, the SCSI target drivers implements UNMAP as calls to blkdev_issue_discard, which does not guarantee zeroing just because Write Zeroes is supported. Note that this does not affect the file backed path which uses fallocate to punch holes. Fixes: 2237498f0b5c ("target/iblock: Convert WRITE_SAME to blkdev_issue_zeroout") Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen --- drivers/target/target_core_device.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index 44bb380e7390c..fa866acef5bb2 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -850,7 +850,6 @@ bool target_configure_unmap_from_queue(struct se_dev_attrib *attrib, attrib->unmap_granularity = q->limits.discard_granularity / block_size; attrib->unmap_granularity_alignment = q->limits.discard_alignment / block_size; - attrib->unmap_zeroes_data = !!(q->limits.max_write_zeroes_sectors); return true; } EXPORT_SYMBOL(target_configure_unmap_from_queue); -- 2.30.2