[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] GFS2] Mark inode dirty data by association



>From 873ffcd14f43c51b9030245e3d257679c323e164 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho redhat com>
Date: Tue, 11 Dec 2007 09:20:53 +0000
Subject: [PATCH] [GFS2] Mark inode dirty data by association

This adds dirty inode data to the b_assoc_buffers list so that
the VFS's own metadata syning functions will see that it is
associated with the inode and sync it as required. This means
that this function no longer needs to be done internally by
GFS2.

This is being done in preparation for future changes where we
will reply on this rather than the current method.

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

diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 29a8689..6b6ae8a 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -67,6 +67,7 @@ static void gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh,
 		       struct gfs2_ail *ai)
 {
 	struct gfs2_bufdata *bd = bh->b_private;
+	struct gfs2_glock *gl = bd->bd_gl;
 
 	gfs2_assert_withdraw(sdp, buffer_uptodate(bh));
 
@@ -74,7 +75,10 @@ static void gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh,
 		gfs2_assert_withdraw(sdp, 0);
 
 	lock_buffer(bh);
-	mark_buffer_dirty(bh);
+	if (gl->gl_ops->go_type == LM_TYPE_INODE && gl->gl_object)
+		mark_buffer_dirty_inode(bh, gl->gl_object);
+	else
+		mark_buffer_dirty(bh);
 	clear_buffer_pinned(bh);
 
 	gfs2_log_lock(sdp);
-- 
1.5.1.2




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]