2018-06-04 14:48 GMT+02:00 Christoph Hellwig <hch@xxxxxx>: > On Mon, Jun 04, 2018 at 02:37:22PM +0200, Andreas Gruenbacher wrote: >> @@ -2106,7 +2105,7 @@ int __generic_write_end(struct inode *inode, loff_t pos, unsigned copied, >> * ordering of page lock and transaction start for journaling >> * filesystems. >> */ >> - if (i_size_changed) >> + if (dirty_inode) >> mark_inode_dirty(inode); >> return copied; > > Calling mark_inode_dirty on an already dirty inode is cheap, so how > about just calling it directly in your caller that always wants to > set the inode dirty? The dirty_inode hook is where gfs2 converts the in-core inode into the on-disk format (the equivalent of xfs_inode_to_disk), so it's not quite that cheap. I realize this could be done differently in gfs2, but that's not where we stand today, and I really can't fix ten things all at the same time. Thanks, Andreas