iomap: don't mark the inode dirty in iomap_write_end
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 28 Jun 2019 00:28:40 +0000 (17:28 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 28 Jun 2019 00:28:40 +0000 (17:28 -0700)
commit8d3e72a180b42c01ec00045e1bb8eb91175adafe
tree28ceebc6e241391ac9a4f1a44e9da6122d02ba37
parentd1fdb6d8f6a4109a4263176c84b899076a5f8008
iomap: don't mark the inode dirty in iomap_write_end

Marking the inode dirty for each page copied into the page cache can be
very inefficient for file systems that use the VFS dirty inode tracking,
and is completely pointless for those that don't use the VFS dirty inode
tracking.  So instead, only set an iomap flag when changing the in-core
inode size, and open code the rest of __generic_write_end.

Partially based on code from Christoph Hellwig.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/gfs2/bmap.c
fs/iomap.c
include/linux/iomap.h