On Nov 14, 2013, at 11:50, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote: > We'll need the i_mutex to prevent i_dio_count from incrementing while > truncate is waiting for it to reach zero, and protects against having > the pagecache repopulated after we flushed it. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> Hi Christoph, Why do we need to protect the page cache here? Using O_DIRECT and the page cache without some kind of application-specific synchronization method is technically not supported, since that violates close-to-open cache consistency. What we _do_ want to support, though, is parallel reads and writes to the server by applications that know what they are doing. If we were to only protect the i_dio_count, then we could fix the truncate race, while continuing to allow parallelism. Is there any reason why we cannot do this? Cheers Trond PS: I appear to be missing 7/7 in this patch series. Should I have seen it?-- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html