Re: [PATCH v2 1/2] dax: dax_pfn_mkwrite() truncate race check

2015-10-16 Thread Jan Kara
On Thu 15-10-15 09:53:16, Dave Chinner wrote: > On Wed, Oct 14, 2015 at 10:40:25AM +0200, Jan Kara wrote: > > On Wed 14-10-15 16:25:50, Dave Chinner wrote: > > > On Tue, Oct 13, 2015 at 04:25:36PM -0600, Ross Zwisler wrote: > > > > Update dax_pfn_mkwrite() so that it validates i_size before

Re: [PATCH v2 1/2] dax: dax_pfn_mkwrite() truncate race check

2015-10-16 Thread Jan Kara
On Thu 15-10-15 09:53:16, Dave Chinner wrote: > On Wed, Oct 14, 2015 at 10:40:25AM +0200, Jan Kara wrote: > > On Wed 14-10-15 16:25:50, Dave Chinner wrote: > > > On Tue, Oct 13, 2015 at 04:25:36PM -0600, Ross Zwisler wrote: > > > > Update dax_pfn_mkwrite() so that it validates i_size before

Re: [PATCH v2 1/2] dax: dax_pfn_mkwrite() truncate race check

2015-10-14 Thread Dave Chinner
On Wed, Oct 14, 2015 at 10:40:25AM +0200, Jan Kara wrote: > On Wed 14-10-15 16:25:50, Dave Chinner wrote: > > On Tue, Oct 13, 2015 at 04:25:36PM -0600, Ross Zwisler wrote: > > > Update dax_pfn_mkwrite() so that it validates i_size before returning. > > > This is necessary to ensure that the page

Re: [PATCH v2 1/2] dax: dax_pfn_mkwrite() truncate race check

2015-10-14 Thread Ross Zwisler
On Wed, Oct 14, 2015 at 04:25:50PM +1100, Dave Chinner wrote: > On Tue, Oct 13, 2015 at 04:25:36PM -0600, Ross Zwisler wrote: > > Update dax_pfn_mkwrite() so that it validates i_size before returning. > > This is necessary to ensure that the page fault has not raced with truncate > > and is now

Re: [PATCH v2 1/2] dax: dax_pfn_mkwrite() truncate race check

2015-10-14 Thread Jan Kara
On Wed 14-10-15 16:25:50, Dave Chinner wrote: > On Tue, Oct 13, 2015 at 04:25:36PM -0600, Ross Zwisler wrote: > > Update dax_pfn_mkwrite() so that it validates i_size before returning. > > This is necessary to ensure that the page fault has not raced with truncate > > and is now pointing to a

Re: [PATCH v2 1/2] dax: dax_pfn_mkwrite() truncate race check

2015-10-14 Thread Ross Zwisler
On Wed, Oct 14, 2015 at 04:25:50PM +1100, Dave Chinner wrote: > On Tue, Oct 13, 2015 at 04:25:36PM -0600, Ross Zwisler wrote: > > Update dax_pfn_mkwrite() so that it validates i_size before returning. > > This is necessary to ensure that the page fault has not raced with truncate > > and is now

Re: [PATCH v2 1/2] dax: dax_pfn_mkwrite() truncate race check

2015-10-14 Thread Jan Kara
On Wed 14-10-15 16:25:50, Dave Chinner wrote: > On Tue, Oct 13, 2015 at 04:25:36PM -0600, Ross Zwisler wrote: > > Update dax_pfn_mkwrite() so that it validates i_size before returning. > > This is necessary to ensure that the page fault has not raced with truncate > > and is now pointing to a

Re: [PATCH v2 1/2] dax: dax_pfn_mkwrite() truncate race check

2015-10-14 Thread Dave Chinner
On Wed, Oct 14, 2015 at 10:40:25AM +0200, Jan Kara wrote: > On Wed 14-10-15 16:25:50, Dave Chinner wrote: > > On Tue, Oct 13, 2015 at 04:25:36PM -0600, Ross Zwisler wrote: > > > Update dax_pfn_mkwrite() so that it validates i_size before returning. > > > This is necessary to ensure that the page

Re: [PATCH v2 1/2] dax: dax_pfn_mkwrite() truncate race check

2015-10-13 Thread Dave Chinner
On Tue, Oct 13, 2015 at 04:25:36PM -0600, Ross Zwisler wrote: > Update dax_pfn_mkwrite() so that it validates i_size before returning. > This is necessary to ensure that the page fault has not raced with truncate > and is now pointing to a region beyond the end of the current file. > > This

[PATCH v2 1/2] dax: dax_pfn_mkwrite() truncate race check

2015-10-13 Thread Ross Zwisler
Update dax_pfn_mkwrite() so that it validates i_size before returning. This is necessary to ensure that the page fault has not raced with truncate and is now pointing to a region beyond the end of the current file. This change is based on a similar outstanding patch for XFS from Dave Chinner

Re: [PATCH v2 1/2] dax: dax_pfn_mkwrite() truncate race check

2015-10-13 Thread Dave Chinner
On Tue, Oct 13, 2015 at 04:25:36PM -0600, Ross Zwisler wrote: > Update dax_pfn_mkwrite() so that it validates i_size before returning. > This is necessary to ensure that the page fault has not raced with truncate > and is now pointing to a region beyond the end of the current file. > > This

[PATCH v2 1/2] dax: dax_pfn_mkwrite() truncate race check

2015-10-13 Thread Ross Zwisler
Update dax_pfn_mkwrite() so that it validates i_size before returning. This is necessary to ensure that the page fault has not raced with truncate and is now pointing to a region beyond the end of the current file. This change is based on a similar outstanding patch for XFS from Dave Chinner