diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-05-18 16:25:27 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-05-18 16:25:27 -0400 |
commit | 320dd101e2d595a03439adb92b319f3af53dd1d0 (patch) | |
tree | 56a88401a218622018030045fec009bafdc4ce76 /fs/gfs2/ops_super.c | |
parent | 3a8a9a1034813aa99f5ae3150f652d490c5ff10d (diff) | |
download | kernel_samsung_tuna-320dd101e2d595a03439adb92b319f3af53dd1d0.zip kernel_samsung_tuna-320dd101e2d595a03439adb92b319f3af53dd1d0.tar.gz kernel_samsung_tuna-320dd101e2d595a03439adb92b319f3af53dd1d0.tar.bz2 |
[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.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c index 6fa7b86..1c17acc 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) return 0; } +static struct inode *gfs2_alloc_inode(struct super_block *sb) +{ + struct gfs2_sbd *sdp = sb->s_fs_info; + struct gfs2_inode *ip; + + ip = kmem_cache_alloc(gfs2_inode_cachep, GFP_KERNEL); + if (ip) { + ip->i_flags = 0; + ip->i_gl = NULL; + ip->i_sbd = sdp; + ip->i_vnode = &ip->i_inode; + ip->i_greedy = gfs2_tune_get(sdp, gt_greedy_default); + ip->i_last_pfault = jiffies; + } + return &ip->i_inode; +} + +static void gfs2_destroy_inode(struct inode *inode) +{ + kmem_cache_free(gfs2_inode_cachep, inode); +} + struct super_operations gfs2_super_ops = { + .alloc_inode = gfs2_alloc_inode, + .destroy_inode = gfs2_destroy_inode, .write_inode = gfs2_write_inode, .put_super = gfs2_put_super, .write_super = gfs2_write_super, |