Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2159655iof; Tue, 7 Jun 2022 21:44:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlyR5Vnjbl8e+gSix8LHe5SPq4DhdZk9h7Iu5Tz8P6A7oZ0wh3YIWg2NQ6M9t23iJgvIj4 X-Received: by 2002:a17:90b:4b8d:b0:1e3:5147:6e63 with SMTP id lr13-20020a17090b4b8d00b001e351476e63mr36026632pjb.162.1654663483713; Tue, 07 Jun 2022 21:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654663483; cv=none; d=google.com; s=arc-20160816; b=QILFXhs0YNcW18De+XzUMxTbHIEODbLzSLWBwPe9ZYuBpelzaKsTP6JRGHien9yxZ5 +4xHByGV7HxB6FI9T0DxwSTfvmOWHcTEqH1nQ/1hETrEK0TozI1WTp2+6naQ7QXLTrKV fg5E8IHe0lH0+qrYEz42wFRwDrqRxjWsGsnOYj8hKdMQ59GtEO2feYcSpDILotyv9pvV F9OLKeHcMoMU586CYhpX3SVS8ccwEephF8QgS/azMzv4E9MnpuVaFco+Qb0+8nNInE1N 4dPkJjkBp5PodNfNaUJygN03Gtc3m8lY3Hf7GupDVXKXwAPuS5zEz9e8V+PdQIRkuvhc tdHA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NzwvpBQgAe+uAyzaCuYyEUjYEaTnM32fDxj8SqwYF+s=; b=gyp/SaFKHW7KgqBngZY7ASoqrOJ3r6KMe/OuVX+R6w6fDugqCMjAZbpgkDdUTI25Gf KPwV0WfMZFk3q1bLgJWaU9JMOzDgoOs3i8Un0lwhICHkDaD8a5sYuQfswgwqo5fN15as 7n5EloSeOcdV9CHd/2+3JebY1NvrTLJjXe0dBVrSNhShdhy3WpQm+a27i8GSnMTmhQn8 vinQHn7MoHNvFoBh0LFSwgD3J8Ok87aa2+Qgd/F8SE9HykLr/a51dREWPJ32cyYPwlkR e3TNE536ANF45L3EKoJwfPfdPBu7L5y4UMWz7z979mwtQygrxE5yH+kjPZwPKm6mzKm8 Zp6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cpCnUYaa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k16-20020a170902d59000b00156890a4f22si2304130plh.483.2022.06.07.21.44.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:44:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=cpCnUYaa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 95BFB3DD459; Tue, 7 Jun 2022 21:13:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348560AbiFGWeX (ORCPT + 99 others); Tue, 7 Jun 2022 18:34:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378774AbiFGVWi (ORCPT ); Tue, 7 Jun 2022 17:22:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0890226548; Tue, 7 Jun 2022 12:00:33 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 041EAB8239C; Tue, 7 Jun 2022 19:00:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5AA1CC34115; Tue, 7 Jun 2022 19:00:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628404; bh=u0uLyzgE+ia6tDIqfwqEGTu45WQk2+LGG1+RdUhBmCU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cpCnUYaaP8UR/yD7JaARtLMQrS80cEHV25tGV+gLVBLWH9cBQAf5aycqpCxNuGD4l yWuX8a9La608ePTVUCq3I36YUeIvKq3U8hNpE4Y+CUBpY8DsagUawfEtxEp0Yp0nKb rHaZFu9A3bNZtnIoP/g58E8MPszBi3wvXmbgqg+Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoph Hellwig , "Martin K. Petersen" , Chaitanya Kulkarni , Jens Axboe , Sasha Levin Subject: [PATCH 5.18 316/879] target: remove an incorrect unmap zeroes data deduction Date: Tue, 7 Jun 2022 18:57:14 +0200 Message-Id: <20220607165012.021317087@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org From: Christoph Hellwig [ Upstream commit 179d8609d8424529e95021df939ed7b0b82b37f1 ] 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 Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20220415045258.199825-2-hch@lst.de Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- 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 44bb380e7390..fa866acef5bb 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.35.1