From: Dave Chinner <david@fromorbit.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Jens Axboe <axboe@kernel.dk>, Boaz Harrosh <boaz@plexistor.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Ross Zwisler <ross.zwisler@linux.intel.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 2/2] block, dax: fix lifetime of in-kernel dax mappings
Date: Wed, 7 Oct 2015 08:15:25 +1100 [thread overview]
Message-ID: <20151006211525.GC32150@dastard> (raw)
In-Reply-To: <CAPcyv4gw=sGqH=bTP7zkMgQCeJefrCbXNW9CHfqHCqd=DcKbPQ@mail.gmail.com>
On Mon, Oct 05, 2015 at 06:57:19PM -0700, Dan Williams wrote:
> On Wed, Sep 30, 2015 at 4:35 PM, Dave Chinner <david@fromorbit.com> wrote:
> > On Tue, Sep 29, 2015 at 08:41:36PM -0400, Dan Williams wrote:
> >> +static void __pmem *__dax_map_bh(const struct buffer_head *bh, unsigned blkbits,
> >> + unsigned long *pfn, long *len)
> >
> > Please don't use bufferheads for this. Please pass an inode, the
> > block and length to map, similar to dax_clear_blocks().
> >
> > Why? Because dax_clear_blocks() needs to do this "mapping" too,
> > and it is called from contexts where there are no bufferheads.
> > There's a good chance we'll need more mapping contexts like this in
> > future, so lets not propagate bufferheads deeper into this code
> > than we absilutely need to.
> >
> > We should be trying to limit/remove bufferheads in the DAX code, not
> > propagating them deeper into the code...
>
> So I gave this a try but ran into the road block that get_block() is
> performing the inode to bdev conversion and that is filesystem
> specific. However, I'll at least not pass the bh into this map
> routine and will call it dax_map_atomic() which is more accurate.
Right, we still need the bh for the get_block call - that much is
unavoidable right now, but I'm angling towards converting XFS to
use a struct iomap and ->map_blocks method similar to the
exportfs calls for PNFS in future. Having a dedicated structure and
set of methods for obtaining and manipulating extent mappings on
inodes will make all these bufferhead issues go away...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
prev parent reply other threads:[~2015-10-06 21:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-30 0:41 [PATCH 0/2] block drivers + dax vs driver unbind Dan Williams
2015-09-30 0:41 ` [PATCH 1/2] block: generic request_queue reference counting Dan Williams
2015-10-04 6:40 ` Christoph Hellwig
2015-10-05 23:44 ` Dan Williams
2015-10-04 7:52 ` Ming Lei
2015-10-05 23:23 ` Dan Williams
2015-10-06 10:46 ` Ming Lei
2015-10-06 16:04 ` Dan Williams
2015-09-30 0:41 ` [PATCH 2/2] block, dax: fix lifetime of in-kernel dax mappings Dan Williams
2015-09-30 23:35 ` Dave Chinner
2015-10-01 0:09 ` Dan Williams
2015-10-06 1:57 ` Dan Williams
2015-10-06 21:15 ` Dave Chinner [this message]
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=20151006211525.GC32150@dastard \
--to=david@fromorbit.com \
--cc=axboe@kernel.dk \
--cc=boaz@plexistor.com \
--cc=dan.j.williams@intel.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@ml01.01.org \
--cc=ross.zwisler@linux.intel.com \
/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