linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* GFS2: A couple more small fixes
@ 2009-04-21  8:09 Steven Whitehouse
  2009-04-21  8:09 ` [PATCH 1/2] GFS2: Clear dirty bit at end of inode glock sync Steven Whitehouse
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Whitehouse @ 2009-04-21  8:09 UTC (permalink / raw)
  To: linux-kernel, cluster-devel

Both of the following patches are pretty small. The patch to clear
the dirty bit at the end of the glock flush is the more important
one for now,

Steve.



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

* [PATCH 1/2] GFS2: Clear dirty bit at end of inode glock sync
  2009-04-21  8:09 GFS2: A couple more small fixes Steven Whitehouse
@ 2009-04-21  8:09 ` Steven Whitehouse
  2009-04-21  8:09   ` [PATCH 2/2] GFS2: Fix page_mkwrite() return code Steven Whitehouse
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Whitehouse @ 2009-04-21  8:09 UTC (permalink / raw)
  To: linux-kernel, cluster-devel; +Cc: Steven Whitehouse

The dirty bit can get set during the inode glock sync. Its too
complicated to change that at the moment, so this is the quick
fix - to clear the bit again at the end of the function.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>

diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index bf23a62..70f87f4 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -156,6 +156,12 @@ static void inode_go_sync(struct gfs2_glock *gl)
 	error = filemap_fdatawait(metamapping);
 	mapping_set_error(metamapping, error);
 	gfs2_ail_empty_gl(gl);
+	/*
+	 * Writeback of the data mapping may cause the dirty flag to be set
+	 * so we have to clear it again here.
+	 */
+	smp_mb__before_clear_bit();
+	clear_bit(GLF_DIRTY, &gl->gl_flags);
 }
 
 /**
-- 
1.6.0.6


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

* [PATCH 2/2] GFS2: Fix page_mkwrite() return code
  2009-04-21  8:09 ` [PATCH 1/2] GFS2: Clear dirty bit at end of inode glock sync Steven Whitehouse
@ 2009-04-21  8:09   ` Steven Whitehouse
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Whitehouse @ 2009-04-21  8:09 UTC (permalink / raw)
  To: linux-kernel, cluster-devel; +Cc: Steven Whitehouse

This allows for the possibility of returning VM_FAULT_OOM as
well as VM_FAULT_SIGBUS. This ensures that the correct action
is taken.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>

diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index 101caf3..5d82e91 100644
--- a/fs/gfs2/ops_file.c
+++ b/fs/gfs2/ops_file.c
@@ -413,7 +413,9 @@ out_unlock:
 	gfs2_glock_dq(&gh);
 out:
 	gfs2_holder_uninit(&gh);
-	if (ret)
+	if (ret == -ENOMEM)
+		ret = VM_FAULT_OOM;
+	else if (ret)
 		ret = VM_FAULT_SIGBUS;
 	return ret;
 }
-- 
1.6.0.6


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

end of thread, other threads:[~2009-04-21  9:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-21  8:09 GFS2: A couple more small fixes Steven Whitehouse
2009-04-21  8:09 ` [PATCH 1/2] GFS2: Clear dirty bit at end of inode glock sync Steven Whitehouse
2009-04-21  8:09   ` [PATCH 2/2] GFS2: Fix page_mkwrite() return code Steven Whitehouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).