• Andreas Gruenbacher's avatar
    gfs2: Don't update inode timestamps for direct writes · 089f4eb0
    Andreas Gruenbacher authored
    During direct reads and writes, the caller is holding the inode glock in
    deferred mode, which doesn't allow metadata updates.  However, a previous
    change caused callers to update the inode modification time before carrying out
    direct writes, which caused the inode glock to be converted to exclusive mode
    for the timestamp update, only to be immediately converted back to deferred
    mode for the direct write.  This locks out other direct readers and writers
    and wreaks havoc on performance.
    
    Fix that by reverting to not updating the inode modification time for direct
    writes.
    Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
    089f4eb0
file.c 40.5 KB