aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_super.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-05-18 16:25:27 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-05-18 16:25:27 -0400
commit320dd101e2d595a03439adb92b319f3af53dd1d0 (patch)
tree56a88401a218622018030045fec009bafdc4ce76 /fs/gfs2/ops_super.c
parent3a8a9a1034813aa99f5ae3150f652d490c5ff10d (diff)
[GFS2] glock debugging and inode cache changes
This adds some extra debugging to glock.c and changes inode.c's deallocation code to call the debugging code at a suitable moment. I'm chasing down a particular bug to do with deallocation at the moment and the code can go again once the bug is fixed. Also this includes the first part of some changes to unify the Linux struct inode and GFS2's struct gfs2_inode. This transformation will happen in small parts over the next short period. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_super.c')
-rw-r--r--fs/gfs2/ops_super.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c
index 6fa7b8649f14..1c17acc946f9 100644
--- a/fs/gfs2/ops_super.c
+++ b/fs/gfs2/ops_super.c
@@ -361,7 +361,31 @@ static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt)
361 return 0; 361 return 0;
362} 362}
363 363
364static struct inode *gfs2_alloc_inode(struct super_block *sb)
365{
366 struct gfs2_sbd *sdp = sb->s_fs_info;
367 struct gfs2_inode *ip;
368
369 ip = kmem_cache_alloc(gfs2_inode_cachep, GFP_KERNEL);
370 if (ip) {
371 ip->i_flags = 0;
372 ip->i_gl = NULL;
373 ip->i_sbd = sdp;
374 ip->i_vnode = &ip->i_inode;
375 ip->i_greedy = gfs2_tune_get(sdp, gt_greedy_default);
376 ip->i_last_pfault = jiffies;
377 }
378 return &ip->i_inode;
379}
380
381static void gfs2_destroy_inode(struct inode *inode)
382{
383 kmem_cache_free(gfs2_inode_cachep, inode);
384}
385
364struct super_operations gfs2_super_ops = { 386struct super_operations gfs2_super_ops = {
387 .alloc_inode = gfs2_alloc_inode,
388 .destroy_inode = gfs2_destroy_inode,
365 .write_inode = gfs2_write_inode, 389 .write_inode = gfs2_write_inode,
366 .put_super = gfs2_put_super, 390 .put_super = gfs2_put_super,
367 .write_super = gfs2_write_super, 391 .write_super = gfs2_write_super,