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

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 pos

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 e

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 pos

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 do