Re: [PATCH] mm: cleancache: fix corruption on missed inode invalidation

2018-11-15 Thread Vasily Averin
On 11/16/18 1:31 AM, Andrew Morton wrote: > On Mon, 12 Nov 2018 12:57:34 +0300 Pavel Tikhomirov > wrote: > >> If all pages are deleted from the mapping by memory reclaim and also >> moved to the cleancache: >> >> __delete_from_page_cache >> (no shadow case) >> unaccount_page_cache_page >>

Re: [PATCH] mm: cleancache: fix corruption on missed inode invalidation

2018-11-15 Thread Andrew Morton
On Mon, 12 Nov 2018 12:57:34 +0300 Pavel Tikhomirov wrote: > If all pages are deleted from the mapping by memory reclaim and also > moved to the cleancache: > > __delete_from_page_cache > (no shadow case) > unaccount_page_cache_page > cleancache_put_page > page_cache_delete > mapp

Re: [PATCH] mm: cleancache: fix corruption on missed inode invalidation

2018-11-15 Thread Andrew Morton
On Mon, 12 Nov 2018 12:31:53 +0100 Jan Kara wrote: > > mm/truncate.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > The patch looks good but can you add a short comment before the > truncate_inode_pages() call explaining why it needs to be called always? > Something like: >

Re: [PATCH] mm: cleancache: fix corruption on missed inode invalidation

2018-11-12 Thread Jan Kara
On Mon 12-11-18 14:40:06, Andrey Ryabinin wrote: > > > On 11/12/18 2:31 PM, Jan Kara wrote: > > On Mon 12-11-18 12:57:34, Pavel Tikhomirov wrote: > >> If all pages are deleted from the mapping by memory reclaim and also > >> moved to the cleancache: > >> > >> __delete_from_page_cache > >> (no s

Re: [PATCH] mm: cleancache: fix corruption on missed inode invalidation

2018-11-12 Thread Andrey Ryabinin
On 11/12/18 2:31 PM, Jan Kara wrote: > On Mon 12-11-18 12:57:34, Pavel Tikhomirov wrote: >> If all pages are deleted from the mapping by memory reclaim and also >> moved to the cleancache: >> >> __delete_from_page_cache >> (no shadow case) >> unaccount_page_cache_page >> cleancache_put_p

Re: [PATCH] mm: cleancache: fix corruption on missed inode invalidation

2018-11-12 Thread Jan Kara
On Mon 12-11-18 12:57:34, Pavel Tikhomirov wrote: > If all pages are deleted from the mapping by memory reclaim and also > moved to the cleancache: > > __delete_from_page_cache > (no shadow case) > unaccount_page_cache_page > cleancache_put_page > page_cache_delete > mapping->nrpages