All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] [GFS2 PATCH] gfs2: Remove inode from ordered write list in gfs2_write_inode()
@ 2018-01-29  5:02 Abhi Das
  2018-01-29  9:46 ` Steven Whitehouse
  2018-01-30 17:23 ` Bob Peterson
  0 siblings, 2 replies; 4+ messages in thread
From: Abhi Das @ 2018-01-29  5:02 UTC (permalink / raw)
  To: cluster-devel.redhat.com

The vfs clears the I_DIRTY inode flag before calling gfs2_write_inode()
having queued any data that needed to be written to disk.
This is a good time to remove such inodes from our ordered write list
so they don't hang around for long periods of time.

Signed-off-by: Abhi Das <adas@redhat.com>
---
 fs/gfs2/super.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index d81d46e..596feb6 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -766,6 +766,12 @@ static int gfs2_write_inode(struct inode *inode, struct writeback_control *wbc)
 		ret = filemap_fdatawait(metamapping);
 	if (ret)
 		mark_inode_dirty_sync(inode);
+	else {
+		spin_lock(&inode->i_lock);
+		if (!(inode->i_flags & I_DIRTY))
+			gfs2_ordered_del_inode(ip);
+		spin_unlock(&inode->i_lock);
+	}
 	return ret;
 }
 
-- 
2.4.11



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-30 17:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-29  5:02 [Cluster-devel] [GFS2 PATCH] gfs2: Remove inode from ordered write list in gfs2_write_inode() Abhi Das
2018-01-29  9:46 ` Steven Whitehouse
2018-01-29 16:08   ` Abhijith Das
2018-01-30 17:23 ` Bob Peterson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.