aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/meta_io.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-04-07 11:17:32 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-04-07 11:17:32 -0400
commitb09e593d799560f1a0782c20ac5900058390a26f (patch)
tree20f04bd2c8ba9c09ac80a7bb1400d341c4fd7e21 /fs/gfs2/meta_io.c
parent55eccc6d00cea224bf634d44e9871cfe83200ff2 (diff)
[GFS2] Fix a ref count bug and other clean ups
This fixes a ref count bug that sometimes showed up a umount time (causing it to hang) but it otherwise mostly harmless. At the same time there are some clean ups including making the log operations structures const, moving a memory allocation so that its not done in the fast path of checking to see if there is an outstanding transaction related to a particular glock. Removes the sd_log_wrap varaible which was updated, but never actually used anywhere. Updates the gfs2 ioctl() to run without the kernel lock (which it never needed anyway). Removes the "invalidate inodes" loop from GFS2's put_super routine. This is done in kill super anyway so we don't need to do it here. The loop was also bogus in that if there are any inodes "stuck" at this point its a bug and we need to know about it rather than hide it by hanging forever. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/meta_io.c')
-rw-r--r--fs/gfs2/meta_io.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c
index b85fa2464666..4a6aacf294d5 100644
--- a/fs/gfs2/meta_io.c
+++ b/fs/gfs2/meta_io.c
@@ -59,11 +59,12 @@ static int gfs2_aspace_writepage(struct page *page,
59 59
60static void stuck_releasepage(struct buffer_head *bh) 60static void stuck_releasepage(struct buffer_head *bh)
61{ 61{
62 struct gfs2_sbd *sdp = bh->b_page->mapping->host->i_sb->s_fs_info; 62 struct inode *inode = bh->b_page->mapping->host;
63 struct gfs2_sbd *sdp = inode->i_sb->s_fs_info;
63 struct gfs2_bufdata *bd = bh->b_private; 64 struct gfs2_bufdata *bd = bh->b_private;
64 struct gfs2_glock *gl; 65 struct gfs2_glock *gl;
65 66
66 fs_warn(sdp, "stuck in gfs2_releasepage()\n"); 67 fs_warn(sdp, "stuck in gfs2_releasepage() %p\n", inode);
67 fs_warn(sdp, "blkno = %llu, bh->b_count = %d\n", 68 fs_warn(sdp, "blkno = %llu, bh->b_count = %d\n",
68 (uint64_t)bh->b_blocknr, atomic_read(&bh->b_count)); 69 (uint64_t)bh->b_blocknr, atomic_read(&bh->b_count));
69 fs_warn(sdp, "pinned = %u\n", buffer_pinned(bh)); 70 fs_warn(sdp, "pinned = %u\n", buffer_pinned(bh));
@@ -191,7 +192,6 @@ struct inode *gfs2_aspace_get(struct gfs2_sbd *sdp)
191 aspace->u.generic_ip = NULL; 192 aspace->u.generic_ip = NULL;
192 insert_inode_hash(aspace); 193 insert_inode_hash(aspace);
193 } 194 }
194
195 return aspace; 195 return aspace;
196} 196}
197 197
@@ -353,7 +353,7 @@ void gfs2_ail_empty_gl(struct gfs2_glock *gl)
353 gfs2_log_unlock(sdp); 353 gfs2_log_unlock(sdp);
354 354
355 gfs2_trans_end(sdp); 355 gfs2_trans_end(sdp);
356 gfs2_log_flush(sdp); 356 gfs2_log_flush(sdp, NULL);
357} 357}
358 358
359/** 359/**
@@ -876,7 +876,7 @@ void gfs2_meta_ra(struct gfs2_glock *gl, uint64_t dblock, uint32_t extlen)
876 876
877void gfs2_meta_syncfs(struct gfs2_sbd *sdp) 877void gfs2_meta_syncfs(struct gfs2_sbd *sdp)
878{ 878{
879 gfs2_log_flush(sdp); 879 gfs2_log_flush(sdp, NULL);
880 for (;;) { 880 for (;;) {
881 gfs2_ail1_start(sdp, DIO_ALL); 881 gfs2_ail1_start(sdp, DIO_ALL);
882 if (gfs2_ail1_empty(sdp, DIO_ALL)) 882 if (gfs2_ail1_empty(sdp, DIO_ALL))