• Christoph Hellwig's avatar
    nfs: page cache invalidation for dio · a9ab5e84
    Christoph Hellwig authored
    Make sure to properly invalidate the pagecache before performing direct I/O,
    so that no stale pages are left around.  This matches what the generic
    direct I/O code does.  Also take the i_mutex over the direct write submission
    to avoid the lifelock vs truncate waiting for i_dio_count to decrease, and
    to avoid having the pagecache easily repopulated while direct I/O is in
    progrss.  Again matching the generic direct I/O code.
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
    a9ab5e84
direct.c 28.1 KB