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
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(+
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
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
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)
>>
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
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