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)
>>
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
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 exceptions are, but it definitely
looks illegal to check only for nrpages in inv
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