• Andrew Morton's avatar
    [PATCH] ext3: disable O_DIRECT in journalled-data mode · 45c22f8f
    Andrew Morton authored
    We cannot sensibly support O_DIRECT reads or writes when all writes are
    journalled.
    
    This is because the VFS explicitly avoids syncing the file metadata during
    O_DIRECT reads and writes.  ext3 with journalled data will leave pending
    changes in memory and they will overwrite the results of O_DIRECT writes, and
    O_DIRECT reads will not return the latest data.
    
    Setting the a_op to null will cause opens and fcntl(F_SETFL) to return
    -EINVAL if O_DIRECT is requested.
    45c22f8f
inode.c 85.5 KB