Re: [Devel] [PATCH rh7] fs/cleancache: fix data invalidation in the cleancache during direct_io

2017-04-12 Thread Andrey Ryabinin
On 04/11/2017 08:08 PM, Alexey Kuznetsov wrote: > Hello! > > Good job! > > Before submitting this to mainstream look > at truncate_inode_pages. > > It has condition: > > if (mapping->nrpages == 0 && mapping->nrexceptional == 0) > return; > > I have no idea what are those except

[Devel] [PATCH rh7 3/3] fs/block_dev: always invalidate cleancache in invalidate_bdev()

2017-04-12 Thread Andrey Ryabinin
invalidate_bdev() calls cleancache_invalidate_inode() iff ->nrpages != 0 which doen't make any sense. Make invalidate_bdev() always invalidate cleancache data. https://jira.sw.ru/browse/PSBM-63908 Signed-off-by: Andrey Ryabinin --- fs/block_dev.c | 12 ++-- 1 file changed, 6 insertions(+

[Devel] [PATCH rh7 2/3] cleancache: avoid pointless cleancache_invalidate_inode() calls.

2017-04-12 Thread Andrey Ryabinin
Per Alexey: there is no point in invalidation of cleancache on entry to truncate_inode_pages_range/invalidate_inode_pages2_range routines. It is waste of time, cleancache will be repopulated by invalidation (which it stupid, of course). It is enough to do this once at exit. https://jira.sw.ru/brow

[Devel] [PATCH rh7 v2 1/3] fs/cleancache: fix data invalidation in the cleancache during direct_io

2017-04-12 Thread Andrey Ryabinin
Currently some direct_io fs hooks call invalidate_inode_pages2_range() conditionally iff mapping->nrpages is not zero. So if nrpages is zero, data in cleancache wouldn't be invalidated. So the next buffered read may get stale data from the cleancache. Fix this by calling invalidate_inode_pages2_ra

Re: [Devel] [PATCH rh7] fs/cleancache: fix data invalidation in the cleancache during direct_io

2017-04-12 Thread Andrey Ryabinin
On 04/12/2017 05:45 PM, Andrey Ryabinin wrote: > On 04/11/2017 08:08 PM, Alexey Kuznetsov wrote: >> Hello! >> >> Good job! >> >> Before submitting this to mainstream look >> at truncate_inode_pages. >> >> It has condition: >> >> if (mapping->nrpages == 0 && mapping->nrexceptional == 0) >>

[Devel] [PATCH libvzctl] env_nsops: Add debug print for catching memory limits setup problem

2017-04-12 Thread Cyrill Gorcunov
In a sake of https://jira.sw.ru/browse/PSBM-64043 Signed-off-by: Cyrill Gorcunov --- Igor, I believe this is suitable for cathing problems. lib/cgroup.h| 2 ++ lib/env_nsops.c | 7 +++ 2 files changed, 9 insertions(+) diff --git a/lib/cgroup.h b/lib/cgroup.h index 23bd45a..a27ca96 100

Re: [Devel] [PATCH rh7 v2 1/3] fs/cleancache: fix data invalidation in the cleancache during direct_io

2017-04-12 Thread Dmitry Monakhov
Andrey Ryabinin writes: > Currently some direct_io fs hooks call invalidate_inode_pages2_range() > conditionally iff mapping->nrpages is not zero. So if nrpages is zero, > data in cleancache wouldn't be invalidated. So the next buffered read > may get stale data from the cleancache. > > Fix this