Re: [PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-12 Thread Jan Kara
On Tue 11-10-16 16:51:30, Ross Zwisler wrote: > On Tue, Oct 11, 2016 at 10:31:52AM +0200, Jan Kara wrote: > > On Fri 07-10-16 15:09:02, Ross Zwisler wrote: > > > diff --git a/fs/dax.c b/fs/dax.c > > > index ac3cd05..e51d51f 100644 > > > --- a/fs/dax.c > > > +++ b/fs/dax.c > > > @@ -281,7 +281,7 @@

Re: [PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-12 Thread Jan Kara
On Tue 11-10-16 16:51:30, Ross Zwisler wrote: > On Tue, Oct 11, 2016 at 10:31:52AM +0200, Jan Kara wrote: > > On Fri 07-10-16 15:09:02, Ross Zwisler wrote: > > > diff --git a/fs/dax.c b/fs/dax.c > > > index ac3cd05..e51d51f 100644 > > > --- a/fs/dax.c > > > +++ b/fs/dax.c > > > @@ -281,7 +281,7 @@

Re: [PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-11 Thread Ross Zwisler
On Tue, Oct 11, 2016 at 10:31:52AM +0200, Jan Kara wrote: > On Fri 07-10-16 15:09:02, Ross Zwisler wrote: > > diff --git a/fs/dax.c b/fs/dax.c > > index ac3cd05..e51d51f 100644 > > --- a/fs/dax.c > > +++ b/fs/dax.c > > @@ -281,7 +281,7 @@ static wait_queue_head_t *dax_entry_waitqueue(struct > >

Re: [PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-11 Thread Ross Zwisler
On Tue, Oct 11, 2016 at 10:31:52AM +0200, Jan Kara wrote: > On Fri 07-10-16 15:09:02, Ross Zwisler wrote: > > diff --git a/fs/dax.c b/fs/dax.c > > index ac3cd05..e51d51f 100644 > > --- a/fs/dax.c > > +++ b/fs/dax.c > > @@ -281,7 +281,7 @@ static wait_queue_head_t *dax_entry_waitqueue(struct > >

Re: [PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-11 Thread Ross Zwisler
On Mon, Oct 10, 2016 at 05:59:17PM +0200, Christoph Hellwig wrote: > On Fri, Oct 07, 2016 at 03:09:02PM -0600, Ross Zwisler wrote: > > - if (RADIX_DAX_TYPE(entry) == RADIX_DAX_PMD) > > + if ((unsigned long)entry & RADIX_DAX_PMD) > > Please introduce a proper inline helper that mask all the

Re: [PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-11 Thread Ross Zwisler
On Mon, Oct 10, 2016 at 05:59:17PM +0200, Christoph Hellwig wrote: > On Fri, Oct 07, 2016 at 03:09:02PM -0600, Ross Zwisler wrote: > > - if (RADIX_DAX_TYPE(entry) == RADIX_DAX_PMD) > > + if ((unsigned long)entry & RADIX_DAX_PMD) > > Please introduce a proper inline helper that mask all the

Re: [PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-11 Thread Jan Kara
On Fri 07-10-16 15:09:02, Ross Zwisler wrote: > diff --git a/fs/dax.c b/fs/dax.c > index ac3cd05..e51d51f 100644 > --- a/fs/dax.c > +++ b/fs/dax.c > @@ -281,7 +281,7 @@ static wait_queue_head_t *dax_entry_waitqueue(struct > address_space *mapping, >* queue to the start of that PMD. This

Re: [PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-11 Thread Jan Kara
On Fri 07-10-16 15:09:02, Ross Zwisler wrote: > diff --git a/fs/dax.c b/fs/dax.c > index ac3cd05..e51d51f 100644 > --- a/fs/dax.c > +++ b/fs/dax.c > @@ -281,7 +281,7 @@ static wait_queue_head_t *dax_entry_waitqueue(struct > address_space *mapping, >* queue to the start of that PMD. This

Re: [PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-10 Thread Ross Zwisler
On Mon, Oct 10, 2016 at 05:59:17PM +0200, Christoph Hellwig wrote: > On Fri, Oct 07, 2016 at 03:09:02PM -0600, Ross Zwisler wrote: > > - if (RADIX_DAX_TYPE(entry) == RADIX_DAX_PMD) > > + if ((unsigned long)entry & RADIX_DAX_PMD) > > Please introduce a proper inline helper that mask all the

Re: [PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-10 Thread Ross Zwisler
On Mon, Oct 10, 2016 at 05:59:17PM +0200, Christoph Hellwig wrote: > On Fri, Oct 07, 2016 at 03:09:02PM -0600, Ross Zwisler wrote: > > - if (RADIX_DAX_TYPE(entry) == RADIX_DAX_PMD) > > + if ((unsigned long)entry & RADIX_DAX_PMD) > > Please introduce a proper inline helper that mask all the

Re: [PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-10 Thread Christoph Hellwig
On Fri, Oct 07, 2016 at 03:09:02PM -0600, Ross Zwisler wrote: > - if (RADIX_DAX_TYPE(entry) == RADIX_DAX_PMD) > + if ((unsigned long)entry & RADIX_DAX_PMD) Please introduce a proper inline helper that mask all the possible type bits out of the radix tree entry, and use them wherever you

Re: [PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-10 Thread Christoph Hellwig
On Fri, Oct 07, 2016 at 03:09:02PM -0600, Ross Zwisler wrote: > - if (RADIX_DAX_TYPE(entry) == RADIX_DAX_PMD) > + if ((unsigned long)entry & RADIX_DAX_PMD) Please introduce a proper inline helper that mask all the possible type bits out of the radix tree entry, and use them wherever you

[PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-07 Thread Ross Zwisler
DAX PMDs have been disabled since Jan Kara introduced DAX radix tree based locking. This patch allows DAX PMDs to participate in the DAX radix tree based locking scheme so that they can be re-enabled using the new struct iomap based fault handlers. There are currently three types of DAX 4k

[PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-07 Thread Ross Zwisler
DAX PMDs have been disabled since Jan Kara introduced DAX radix tree based locking. This patch allows DAX PMDs to participate in the DAX radix tree based locking scheme so that they can be re-enabled using the new struct iomap based fault handlers. There are currently three types of DAX 4k