Re: [RFC PATCH 1/2] mm: introduce bmap_walk()

2017-06-20 Thread Christoph Hellwig
On Mon, Jun 19, 2017 at 07:19:57PM +0100, Al Viro wrote: > Speaking of iomap, what's supposed to happen when doing a write into what > used to be a hole? Suppose we have a file with a megabyte hole in it > and there's some process mmapping that range. Another process does > write over the entire

Re: [RFC PATCH 1/2] mm: introduce bmap_walk()

2017-06-20 Thread Christoph Hellwig
On Mon, Jun 19, 2017 at 07:19:57PM +0100, Al Viro wrote: > Speaking of iomap, what's supposed to happen when doing a write into what > used to be a hole? Suppose we have a file with a megabyte hole in it > and there's some process mmapping that range. Another process does > write over the entire

Re: [RFC PATCH 1/2] mm: introduce bmap_walk()

2017-06-19 Thread Al Viro
On Sun, Jun 18, 2017 at 09:51:52AM +0200, Christoph Hellwig wrote: > > That said, I think "please don't add a new bmap() > > user, use iomap instead" is a fair comment. You know me well enough to > > know that would be all it takes to redirect my work, I can do without > > the bluster. > > But

Re: [RFC PATCH 1/2] mm: introduce bmap_walk()

2017-06-19 Thread Al Viro
On Sun, Jun 18, 2017 at 09:51:52AM +0200, Christoph Hellwig wrote: > > That said, I think "please don't add a new bmap() > > user, use iomap instead" is a fair comment. You know me well enough to > > know that would be all it takes to redirect my work, I can do without > > the bluster. > > But

Re: [RFC PATCH 1/2] mm: introduce bmap_walk()

2017-06-19 Thread Darrick J. Wong
On Sun, Jun 18, 2017 at 09:51:52AM +0200, Christoph Hellwig wrote: > On Sat, Jun 17, 2017 at 05:29:23AM -0700, Dan Williams wrote: > > On Fri, Jun 16, 2017 at 10:22 PM, Christoph Hellwig wrote: > > > On Fri, Jun 16, 2017 at 06:15:29PM -0700, Dan Williams wrote: > > >> Refactor the

Re: [RFC PATCH 1/2] mm: introduce bmap_walk()

2017-06-19 Thread Darrick J. Wong
On Sun, Jun 18, 2017 at 09:51:52AM +0200, Christoph Hellwig wrote: > On Sat, Jun 17, 2017 at 05:29:23AM -0700, Dan Williams wrote: > > On Fri, Jun 16, 2017 at 10:22 PM, Christoph Hellwig wrote: > > > On Fri, Jun 16, 2017 at 06:15:29PM -0700, Dan Williams wrote: > > >> Refactor the core of

Re: [RFC PATCH 1/2] mm: introduce bmap_walk()

2017-06-18 Thread Christoph Hellwig
On Sat, Jun 17, 2017 at 05:29:23AM -0700, Dan Williams wrote: > On Fri, Jun 16, 2017 at 10:22 PM, Christoph Hellwig wrote: > > On Fri, Jun 16, 2017 at 06:15:29PM -0700, Dan Williams wrote: > >> Refactor the core of generic_swapfile_activate() into bmap_walk() so > >> that it can be

Re: [RFC PATCH 1/2] mm: introduce bmap_walk()

2017-06-18 Thread Christoph Hellwig
On Sat, Jun 17, 2017 at 05:29:23AM -0700, Dan Williams wrote: > On Fri, Jun 16, 2017 at 10:22 PM, Christoph Hellwig wrote: > > On Fri, Jun 16, 2017 at 06:15:29PM -0700, Dan Williams wrote: > >> Refactor the core of generic_swapfile_activate() into bmap_walk() so > >> that it can be used by a new

Re: [RFC PATCH 1/2] mm: introduce bmap_walk()

2017-06-17 Thread Dan Williams
On Fri, Jun 16, 2017 at 10:22 PM, Christoph Hellwig wrote: > On Fri, Jun 16, 2017 at 06:15:29PM -0700, Dan Williams wrote: >> Refactor the core of generic_swapfile_activate() into bmap_walk() so >> that it can be used by a new daxfile_activate() helper (to be added). > > No way in

Re: [RFC PATCH 1/2] mm: introduce bmap_walk()

2017-06-17 Thread Dan Williams
On Fri, Jun 16, 2017 at 10:22 PM, Christoph Hellwig wrote: > On Fri, Jun 16, 2017 at 06:15:29PM -0700, Dan Williams wrote: >> Refactor the core of generic_swapfile_activate() into bmap_walk() so >> that it can be used by a new daxfile_activate() helper (to be added). > > No way in hell!

Re: [RFC PATCH 1/2] mm: introduce bmap_walk()

2017-06-16 Thread Christoph Hellwig
On Fri, Jun 16, 2017 at 06:15:29PM -0700, Dan Williams wrote: > Refactor the core of generic_swapfile_activate() into bmap_walk() so > that it can be used by a new daxfile_activate() helper (to be added). No way in hell! generic_swapfile_activate needs to day and no new users of ->bmap over my

Re: [RFC PATCH 1/2] mm: introduce bmap_walk()

2017-06-16 Thread Christoph Hellwig
On Fri, Jun 16, 2017 at 06:15:29PM -0700, Dan Williams wrote: > Refactor the core of generic_swapfile_activate() into bmap_walk() so > that it can be used by a new daxfile_activate() helper (to be added). No way in hell! generic_swapfile_activate needs to day and no new users of ->bmap over my

[RFC PATCH 1/2] mm: introduce bmap_walk()

2017-06-16 Thread Dan Williams
Refactor the core of generic_swapfile_activate() into bmap_walk() so that it can be used by a new daxfile_activate() helper (to be added). There should be no functional differences as a result of this change, although it does add the capability to perform the bmap with a given page-size. This is

[RFC PATCH 1/2] mm: introduce bmap_walk()

2017-06-16 Thread Dan Williams
Refactor the core of generic_swapfile_activate() into bmap_walk() so that it can be used by a new daxfile_activate() helper (to be added). There should be no functional differences as a result of this change, although it does add the capability to perform the bmap with a given page-size. This is