Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp516800pxb; Thu, 26 Aug 2021 08:13:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbqiW018mKHvXC7PdRxHyWfuUU0/RQB2WrAjGr+dAyQ4T/7vl02USIQi2Cnyl3Nj6cbCLs X-Received: by 2002:a1c:f414:: with SMTP id z20mr15127361wma.94.1629990803439; Thu, 26 Aug 2021 08:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629990803; cv=none; d=google.com; s=arc-20160816; b=JY85wtfFo1ZIYFXTr+vi8OiQTr7DYoCdKmTR5i5r8xHAja91KlqFBpNzBvkQgQ2VZK xtTSaHd2rzRZx1B6/+aFUfqiW9Yyhs6yHzEE5+oPxP3NrzCmKhYSlvtaZ+pcJsyajMih KPK9e6pQ57+8ax3ppTYyKGzm4PWyRn1sDCLlER9dakKbIX+Vee99kM1GjQhHyxkUPZB2 Y4sxIUGqBy4XPvffUFJ2YZHmPmyYATz3iOP11lLPb4CxTQW0YplxtqQMuWoF4V7DqnnF CMSJDNdYNBxYUIi6wE3C5M2zTPbOli2gDobfpFrNUSEi8QIoJYH8opezHPxwFaBBU2cV koPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aOPr+397MTn3KqJI39utmp8Gf6kxGWCHfiQQO0OGfG4=; b=IlAjjwPo+HtVAMVdQXbN7mz48JDh+q1TgAP+eenEujkcl9UZCpnPjt5d0bhxI+Vruc +bchmGWm7/nu7iLfRd88rJNDot8Mu39rCBnY5jtcnIPG6H8AnGqrhKyXHKG/MDAR2QNP Tbtlcgy8YCCHDhBc5lc8gIXQwQJU5vA5Ufod2hNxCiDLL8FpVz3aJ+8A1fRHS4e8Szh7 9GWAhJasxcF92nwFWjhNPYmDIe5/mf0kFcdfuDGuOMorMGZu/YNIYYrwj2koykJBG/fB ScDRzP64fuk5bpdlxDOE4S2d3Ljdh358wgGSMe1DWTElQ+NbLNi2PZdJA7S8UCYjTq0Y vymw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nwIQ3u4H; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o2si3436983eds.325.2021.08.26.08.12.25; Thu, 26 Aug 2021 08:13:23 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=nwIQ3u4H; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234068AbhHZPMD (ORCPT + 99 others); Thu, 26 Aug 2021 11:12:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:57350 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237317AbhHZPMD (ORCPT ); Thu, 26 Aug 2021 11:12:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E333B60F21; Thu, 26 Aug 2021 15:11:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629990676; bh=YIVjWXw8f+ZBPD7zdaxiLaLkxWEJo/Ev3bHAZJpMGGE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nwIQ3u4HypRcZ0l2pi/CUVTLmWvNM+eWTq/XyYEfj4FurR5GlzGNOubvbYnDD3yRL N3mmB0NhI3n1SwAEl54C7mR6cEgPDf3MgDNv6tK09pzOgviTRnL8yQ0XvlNPDAi7Jt 7A8/HL3tD0tZ3QXVcgdleoHaGCXYVEjvTmaP4OhnSI98AiXaPbwHzmAo9WzADNmKY2 At+wezzks80f03wkv4tH6F+Z9IZGP3GAW5zlNZ/8QDJiMj7DPKQCAISt+mx1DBjTps v8Wn5aTnm2Fg7ipKZlcBBTlwKrSYYXJ9vWeervl40kMwdHW8uEZzqaaRBGDGhqVu8E jWIgH5T22HYaA== Date: Thu, 26 Aug 2021 08:11:15 -0700 From: "Darrick J. Wong" To: Dan Williams Cc: Christoph Hellwig , Vishal Verma , Dave Jiang , Mike Snitzer , Matthew Wilcox , linux-xfs , Linux NVDIMM , linux-fsdevel , linux-ext4 Subject: Re: [PATCH 8/9] xfs: factor out a xfs_buftarg_is_dax helper Message-ID: <20210826151115.GK12640@magnolia> References: <20210826135510.6293-1-hch@lst.de> <20210826135510.6293-9-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Aug 26, 2021 at 07:37:29AM -0700, Dan Williams wrote: > [ add Darrick ] > > > On Thu, Aug 26, 2021 at 7:07 AM Christoph Hellwig wrote: > > > > Refactor the DAX setup code in preparation of removing > > bdev_dax_supported. > > > > Signed-off-by: Christoph Hellwig > > Reviewed-by: Dan Williams > > --- > > fs/xfs/xfs_super.c | 15 +++++++++++---- > > 1 file changed, 11 insertions(+), 4 deletions(-) > > Darrick, any concerns with me taking this through the dax tree? Nope. Reviewed-by: Darrick J. Wong --D > > > > > diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c > > index 2c9e26a44546..5a89bf601d97 100644 > > --- a/fs/xfs/xfs_super.c > > +++ b/fs/xfs/xfs_super.c > > @@ -314,6 +314,14 @@ xfs_set_inode_alloc( > > return (mp->m_flags & XFS_MOUNT_32BITINODES) ? maxagi : agcount; > > } > > > > +static bool > > +xfs_buftarg_is_dax( > > + struct super_block *sb, > > + struct xfs_buftarg *bt) > > +{ > > + return bdev_dax_supported(bt->bt_bdev, sb->s_blocksize); > > +} > > + > > STATIC int > > xfs_blkdev_get( > > xfs_mount_t *mp, > > @@ -1549,11 +1557,10 @@ xfs_fs_fill_super( > > xfs_warn(mp, > > "DAX enabled. Warning: EXPERIMENTAL, use at your own risk"); > > > > - datadev_is_dax = bdev_dax_supported(mp->m_ddev_targp->bt_bdev, > > - sb->s_blocksize); > > + datadev_is_dax = xfs_buftarg_is_dax(sb, mp->m_ddev_targp); > > if (mp->m_rtdev_targp) > > - rtdev_is_dax = bdev_dax_supported( > > - mp->m_rtdev_targp->bt_bdev, sb->s_blocksize); > > + rtdev_is_dax = xfs_buftarg_is_dax(sb, > > + mp->m_rtdev_targp); > > if (!rtdev_is_dax && !datadev_is_dax) { > > xfs_alert(mp, > > "DAX unsupported by block device. Turning off DAX."); > > -- > > 2.30.2 > > > >