The filesystem still doesn't, but if i_size is updated after the page
is returned, we can have a problem that was previously taken care of
with the truncate_count but now isn't.
But if we're supposing the common case for truncate is unmapped mappings,
then the main cost there will be the locking, which I'm trying to avoid.
Hopefully with this patch, most truncate workloads would get faster, even
though truncate mapped files is going to be unavoidably slower.
The unmap_mapping_range that runs after the truncate_inode_pages should
run in the correct order, I believe.
I don't see how you could, because you need to increment truncate_count.
But I believe this is fixing the issue, even if it does so in a peripheral
manner, because it avoids the added cost for unmapped files.
--
SUSE Labs, Novell Inc.
-