Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp104038pxh; Tue, 9 Nov 2021 07:58:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMkcpFw/iGi27NSfWFHftAeBp1D+LVFSObPzYAo6Wv+Mfms1Au153ZhVcPubGCaxtpa1RQ X-Received: by 2002:a05:6e02:1949:: with SMTP id x9mr1975447ilu.20.1636473493144; Tue, 09 Nov 2021 07:58:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636473493; cv=none; d=google.com; s=arc-20160816; b=fNQD+B+h70dhYODsjtu3wjgPQXYBEpHgkoLJV8WEON09yaKfy1VGljBrvs9vomdsUw LH0ooDVwFC4UyKX0mC6P944PPkUX0KaFBFD+4xiHZGF/mgw1jMs6E2Tmb/0DlmWosiho zFUmyXda3VJL/NZpwVCC0x9O3WpMs7FBJ95QNmZYiFE+Wg9Tn3deK6VtlxVEwvBGDR/c P7S+gW4V5JeBz1qw1YoEi1HXxLGk7fvvcDydAYsJP4vgITnAKHMbnflqmXmPzJ4flQUu wRw7Xje6UNMTIKB5/mYTvR38Lt4yI2AVHQtWeYVV4lMRKHCtHUaQdrGMsT+S8+rlJGdm wESg== 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=brXsiud4Cc0AgfRTr4nbCZuEA3TzdfnPNyojG8VnBfw=; b=OBmS1v9qMuJFTZf9jVCWBG56M1fnxWRHpjpdNfv5hwH8BjhuJ85eIRfq1bhuU1JN8f PT5A+iejZaEVAl4KmzeEC2MVRP5+I9xnExc72kX0FtXlJqo/4s07DcVt4b1Q04wRscDo /YBZGktmUHbZoOLhzasRFvYYydzSqpA1+Y8s6AiKW3LR716tVBNVFfaFBn8tncdNXco3 Zj3znS/cvqs8xexj5kBxzGVUFqMqV+Y+rlcqPsvO67EHtlJX1xLcNAlMG34A1RB1O/2p lsDpXkOdLV73Po3RAboRl9qCOs5SX90nEWiYErcAJiTO1sACsoCaG9Dq2VaU9RgXd76Z Jjbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=b+PYedII; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g9si390386iow.41.2021.11.09.07.57.59; Tue, 09 Nov 2021 07:58:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=b+PYedII; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244232AbhKIIgv (ORCPT + 99 others); Tue, 9 Nov 2021 03:36:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244253AbhKIIgp (ORCPT ); Tue, 9 Nov 2021 03:36:45 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 022B1C0613B9; Tue, 9 Nov 2021 00:34:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=brXsiud4Cc0AgfRTr4nbCZuEA3TzdfnPNyojG8VnBfw=; b=b+PYedIIgGjCdMCp9JN/B8B1Fz nzGeNiytbR6ImqRNS4vswOWH638cDm5VRSAitO6lGR+yV/I/Mz2iufYPGI1Y1GX1IfNXWO7JHC4ld fEzA52mVx4lCysgJIIwa69LyDX4hyeuPdKgbYC8DhqLL6Y8vrE5UVY453IQYCupw9RKT4TsXvf2ce j+ewr0bulk+Ez7yJgzAmbWDuIKmcUNTufJ5ljbdNaEC9XUayw1afVZIMZLjhbdRsIoNb6B7m+WiJa HgAsWfZs/0KGoArpevAcNfqJzQStr/V52bfoKMqM4fyX+hMXZKusk/jwOEJCnVmIpMa7W4rq6AHIj j82xNF8w==; Received: from [2001:4bb8:19a:7ee7:fb46:2fe1:8652:d9d4] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkMZm-000sAK-3U; Tue, 09 Nov 2021 08:33:55 +0000 From: Christoph Hellwig To: Dan Williams Cc: Mike Snitzer , Ira Weiny , dm-devel@redhat.com, linux-xfs@vger.kernel.org, nvdimm@lists.linux.dev, linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: [PATCH 24/29] xfs: use xfs_direct_write_iomap_ops for DAX zeroing Date: Tue, 9 Nov 2021 09:33:04 +0100 Message-Id: <20211109083309.584081-25-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211109083309.584081-1-hch@lst.de> References: <20211109083309.584081-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org While the buffered write iomap ops do work due to the fact that zeroing never allocates blocks, the DAX zeroing should use the direct ops just like actual DAX I/O. Signed-off-by: Christoph Hellwig --- fs/xfs/xfs_iomap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index 8cef3b68cba78..704292c6ce0c7 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c @@ -1324,7 +1324,7 @@ xfs_zero_range( if (IS_DAX(inode)) return dax_zero_range(inode, pos, len, did_zero, - &xfs_buffered_write_iomap_ops); + &xfs_direct_write_iomap_ops); return iomap_zero_range(inode, pos, len, did_zero, &xfs_buffered_write_iomap_ops); } @@ -1339,7 +1339,7 @@ xfs_truncate_page( if (IS_DAX(inode)) return dax_truncate_page(inode, pos, did_zero, - &xfs_buffered_write_iomap_ops); + &xfs_direct_write_iomap_ops); return iomap_truncate_page(inode, pos, did_zero, &xfs_buffered_write_iomap_ops); } -- 2.30.2