Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-20 Thread Ross Zwisler
On Thu, Apr 20, 2017 at 04:44:31PM +0200, Jan Kara wrote: > On Thu 20-04-17 16:35:10, Jan Kara wrote: > > On Wed 19-04-17 13:28:36, Ross Zwisler wrote: > > > On Wed, Apr 19, 2017 at 06:11:31PM +0300, Andrey Ryabinin wrote: > > > > On 04/18/2017 10:38 PM, Ross Zwisler wrote: > > > > > On Fri, Apr

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-20 Thread Ross Zwisler
On Thu, Apr 20, 2017 at 04:44:31PM +0200, Jan Kara wrote: > On Thu 20-04-17 16:35:10, Jan Kara wrote: > > On Wed 19-04-17 13:28:36, Ross Zwisler wrote: > > > On Wed, Apr 19, 2017 at 06:11:31PM +0300, Andrey Ryabinin wrote: > > > > On 04/18/2017 10:38 PM, Ross Zwisler wrote: > > > > > On Fri, Apr

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-20 Thread Jan Kara
On Thu 20-04-17 16:35:10, Jan Kara wrote: > On Wed 19-04-17 13:28:36, Ross Zwisler wrote: > > On Wed, Apr 19, 2017 at 06:11:31PM +0300, Andrey Ryabinin wrote: > > > On 04/18/2017 10:38 PM, Ross Zwisler wrote: > > > > On Fri, Apr 14, 2017 at 05:07:50PM +0300, Andrey Ryabinin wrote: > > > >> Some

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-20 Thread Jan Kara
On Thu 20-04-17 16:35:10, Jan Kara wrote: > On Wed 19-04-17 13:28:36, Ross Zwisler wrote: > > On Wed, Apr 19, 2017 at 06:11:31PM +0300, Andrey Ryabinin wrote: > > > On 04/18/2017 10:38 PM, Ross Zwisler wrote: > > > > On Fri, Apr 14, 2017 at 05:07:50PM +0300, Andrey Ryabinin wrote: > > > >> Some

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-20 Thread Jan Kara
On Wed 19-04-17 13:28:36, Ross Zwisler wrote: > On Wed, Apr 19, 2017 at 06:11:31PM +0300, Andrey Ryabinin wrote: > > On 04/18/2017 10:38 PM, Ross Zwisler wrote: > > > On Fri, Apr 14, 2017 at 05:07:50PM +0300, Andrey Ryabinin wrote: > > >> Some direct write fs hooks call

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-20 Thread Jan Kara
On Wed 19-04-17 13:28:36, Ross Zwisler wrote: > On Wed, Apr 19, 2017 at 06:11:31PM +0300, Andrey Ryabinin wrote: > > On 04/18/2017 10:38 PM, Ross Zwisler wrote: > > > On Fri, Apr 14, 2017 at 05:07:50PM +0300, Andrey Ryabinin wrote: > > >> Some direct write fs hooks call

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-19 Thread Ross Zwisler
On Wed, Apr 19, 2017 at 06:11:31PM +0300, Andrey Ryabinin wrote: > On 04/18/2017 10:38 PM, Ross Zwisler wrote: > > On Fri, Apr 14, 2017 at 05:07:50PM +0300, Andrey Ryabinin wrote: > >> Some direct write fs hooks call invalidate_inode_pages2[_range]() > >> conditionally iff mapping->nrpages is not

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-19 Thread Ross Zwisler
On Wed, Apr 19, 2017 at 06:11:31PM +0300, Andrey Ryabinin wrote: > On 04/18/2017 10:38 PM, Ross Zwisler wrote: > > On Fri, Apr 14, 2017 at 05:07:50PM +0300, Andrey Ryabinin wrote: > >> Some direct write fs hooks call invalidate_inode_pages2[_range]() > >> conditionally iff mapping->nrpages is not

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-19 Thread Andrey Ryabinin
On 04/19/2017 01:46 AM, Andrew Morton wrote: > On Fri, 14 Apr 2017 17:07:50 +0300 Andrey Ryabinin > wrote: > >> Some direct write fs hooks call invalidate_inode_pages2[_range]() >> conditionally iff mapping->nrpages is not zero. If page cache is empty, >> buffered

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-19 Thread Andrey Ryabinin
On 04/19/2017 01:46 AM, Andrew Morton wrote: > On Fri, 14 Apr 2017 17:07:50 +0300 Andrey Ryabinin > wrote: > >> Some direct write fs hooks call invalidate_inode_pages2[_range]() >> conditionally iff mapping->nrpages is not zero. If page cache is empty, >> buffered read following after direct

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-19 Thread Andrey Ryabinin
On 04/18/2017 10:38 PM, Ross Zwisler wrote: > On Fri, Apr 14, 2017 at 05:07:50PM +0300, Andrey Ryabinin wrote: >> Some direct write fs hooks call invalidate_inode_pages2[_range]() >> conditionally iff mapping->nrpages is not zero. If page cache is empty, >> buffered read following after direct IO

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-19 Thread Andrey Ryabinin
On 04/18/2017 10:38 PM, Ross Zwisler wrote: > On Fri, Apr 14, 2017 at 05:07:50PM +0300, Andrey Ryabinin wrote: >> Some direct write fs hooks call invalidate_inode_pages2[_range]() >> conditionally iff mapping->nrpages is not zero. If page cache is empty, >> buffered read following after direct IO

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-18 Thread Andrew Morton
On Fri, 14 Apr 2017 17:07:50 +0300 Andrey Ryabinin wrote: > Some direct write fs hooks call invalidate_inode_pages2[_range]() > conditionally iff mapping->nrpages is not zero. If page cache is empty, > buffered read following after direct IO write would get stale data

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-18 Thread Andrew Morton
On Fri, 14 Apr 2017 17:07:50 +0300 Andrey Ryabinin wrote: > Some direct write fs hooks call invalidate_inode_pages2[_range]() > conditionally iff mapping->nrpages is not zero. If page cache is empty, > buffered read following after direct IO write would get stale data from > the cleancache. >

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-18 Thread Ross Zwisler
On Fri, Apr 14, 2017 at 05:07:50PM +0300, Andrey Ryabinin wrote: > Some direct write fs hooks call invalidate_inode_pages2[_range]() > conditionally iff mapping->nrpages is not zero. If page cache is empty, > buffered read following after direct IO write would get stale data from > the cleancache.

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-18 Thread Ross Zwisler
On Fri, Apr 14, 2017 at 05:07:50PM +0300, Andrey Ryabinin wrote: > Some direct write fs hooks call invalidate_inode_pages2[_range]() > conditionally iff mapping->nrpages is not zero. If page cache is empty, > buffered read following after direct IO write would get stale data from > the cleancache.

[PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-14 Thread Andrey Ryabinin
Some direct write fs hooks call invalidate_inode_pages2[_range]() conditionally iff mapping->nrpages is not zero. If page cache is empty, buffered read following after direct IO write would get stale data from the cleancache. Also it doesn't feel right to check only for ->nrpages because

[PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-14 Thread Andrey Ryabinin
Some direct write fs hooks call invalidate_inode_pages2[_range]() conditionally iff mapping->nrpages is not zero. If page cache is empty, buffered read following after direct IO write would get stale data from the cleancache. Also it doesn't feel right to check only for ->nrpages because