From: Steven Whitehouse Date: Wed, 12 Dec 2007 16:24:32 +0000 Subject: [Cluster-devel] GFS2] Mark inode dirty data by association Message-ID: <1197476672.3394.31.camel@menhir.chygwyn.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From 873ffcd14f43c51b9030245e3d257679c323e164 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse 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 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