gfs2: Don't update inode timestamps for direct writes
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 20 Sep 2023 16:17:39 +0000 (18:17 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 22 Sep 2023 11:42:33 +0000 (13:42 +0200)
commit089f4eb003dc2265036aac99c02aa99d6b5c4ac7
tree0a5f1579da77547642ddaa1c56c6fa5dbfbd8124
parent21d9067efc7fe94d2bc6f7c7ce71834d5766bbd8
gfs2: Don't update inode timestamps for direct writes

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: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/file.c