nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Dave Jiang <dave.jiang@intel.com>,
	Mike Snitzer <snitzer@redhat.com>,
	Matthew Wilcox <willy@infradead.org>,
	linux-xfs <linux-xfs@vger.kernel.org>,
	Linux NVDIMM <nvdimm@lists.linux.dev>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-ext4 <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 8/9] xfs: factor out a xfs_buftarg_is_dax helper
Date: Thu, 26 Aug 2021 08:11:15 -0700	[thread overview]
Message-ID: <20210826151115.GK12640@magnolia> (raw)
In-Reply-To: <CAPcyv4jXAxSABiZ543xDWOnx0xGAq+LqjbQdqjs+6wbFgsqYyg@mail.gmail.com>

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 <hch@lst.de> wrote:
> >
> > Refactor the DAX setup code in preparation of removing
> > bdev_dax_supported.
> >
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > Reviewed-by: Dan Williams <dan.j.williams@intel.com>
> > ---
> >  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 <djwong@kernel.org>

--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
> >
> >

  reply	other threads:[~2021-08-26 15:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 13:55 dax_supported() related cleanups v2 Christoph Hellwig
2021-08-26 13:55 ` [PATCH 1/9] fsdax: improve the FS_DAX Kconfig description and help text Christoph Hellwig
2021-08-26 13:55 ` [PATCH 2/9] dax: stop using bdevname Christoph Hellwig
2021-08-26 13:55 ` [PATCH 3/9] dm: use fs_dax_get_by_bdev instead of dax_get_by_host Christoph Hellwig
2021-08-26 14:42   ` Dan Williams
2021-08-26 16:19     ` Mike Snitzer
2021-08-26 13:55 ` [PATCH 4/9] dax: mark dax_get_by_host static Christoph Hellwig
2021-08-26 13:55 ` [PATCH 5/9] dax: move the dax_read_lock() locking into dax_supported Christoph Hellwig
2021-08-26 13:55 ` [PATCH 6/9] dax: remove __generic_fsdax_supported Christoph Hellwig
2021-08-26 13:55 ` [PATCH 7/9] dax: stub out dax_supported for !CONFIG_FS_DAX Christoph Hellwig
2021-08-26 13:55 ` [PATCH 8/9] xfs: factor out a xfs_buftarg_is_dax helper Christoph Hellwig
2021-08-26 14:37   ` Dan Williams
2021-08-26 15:11     ` Darrick J. Wong [this message]
2021-08-26 13:55 ` [PATCH 9/9] dax: remove bdev_dax_supported Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2021-08-23 12:35 dax_supported() related cleanups Christoph Hellwig
2021-08-23 12:35 ` [PATCH 8/9] xfs: factor out a xfs_buftarg_is_dax helper Christoph Hellwig
2021-08-23 21:20   ` Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210826151115.GK12640@magnolia \
    --to=djwong@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=hch@lst.de \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    --cc=snitzer@redhat.com \
    --cc=vishal.l.verma@intel.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).