]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
GFS2: Use ->dirty_inode()
authorSteven Whitehouse <swhiteho@redhat.com>
Mon, 15 Aug 2011 13:20:36 +0000 (14:20 +0100)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 15 Aug 2011 13:20:36 +0000 (14:20 +0100)
commitbd3a160369f94e54af8e20c9d4cc35a84666b94a
tree18ddd9d755ba102a2e7be86b88b1efef41010172
parenta98e5b978fb170b3b45ff8587ce502192a27d39e
GFS2: Use ->dirty_inode()

The aim of this patch is to use the newly enhanced ->dirty_inode()
super block operation to deal with atime updates, rather than
piggy backing that code into ->write_inode() as is currently
done.

The net result is a simplification of the code in various places
and a reduction of the number of gfs2_dinode_out() calls since
this is now implied by ->dirty_inode().

Some of the mark_inode_dirty() calls have been moved under glocks
in order to take advantage of then being able to avoid locking in
->dirty_inode() when we already have suitable locks.

One consequence is that generic_write_end() now correctly deals
with file size updates, so that we do not need a separate check
for that afterwards. This also, indirectly, means that fdatasync
should work correctly on GFS2 - the current code always syncs the
metadata whether it needs to or not.

Has survived testing with postmark (with and without atime) and
also fsx.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/acl.c
fs/gfs2/aops.c
fs/gfs2/dir.c
fs/gfs2/file.c
fs/gfs2/inode.c
fs/gfs2/inode.h
fs/gfs2/quota.c
fs/gfs2/super.c
fs/gfs2/xattr.c