• Andrew Morton's avatar
    [PATCH] O_DIRECT for ext3 · a3b71057
    Andrew Morton authored
    O_DIRECT support for ext3.
    
    It works OK in all journalling modes.
    
    Updates to the file metadata and inode are journalled as usual.
    
    If the system crashes during an appending O_DIRECT write then journal
    recovery will truncate the written-to file back to the length which it
    had on entry to that write.
    
    If the system crashes during a file overwrite to existing blocks then
    the file contents will be an unknown mixture of old and new.
    
    If the system crashes during a file overwrite which instantiates new
    blocks in the middle of the file then there is a possibility of
    uninitialised disk blocks being present in the file post-recovery.
    a3b71057
inode.c 83.8 KB