#include <linux/mount.h>
#include <linux/kthread.h>
#include <linux/delay.h>
+#include <linux/gfs2_ondisk.h>
#include <asm/semaphore.h>
#include "gfs2.h"
+#include "lm_interface.h"
+#include "incore.h"
#include "glock.h"
#include "inode.h"
#include "lm.h"
#include "rgrp.h"
#include "super.h"
#include "sys.h"
+#include "util.h"
/**
* gfs2_write_inode - Make sure the inode is stable on the disk
static int gfs2_write_inode(struct inode *inode, int sync)
{
- struct gfs2_inode *ip = get_v2ip(inode);
+ struct gfs2_inode *ip = inode->u.generic_ip;
if (current->flags & PF_MEMALLOC)
return 0;
static void gfs2_put_super(struct super_block *sb)
{
- struct gfs2_sbd *sdp = get_v2sdp(sb);
+ struct gfs2_sbd *sdp = sb->s_fs_info;
int error;
if (!sdp)
vfree(sdp);
- set_v2sdp(sb, NULL);
+ sb->s_fs_info = NULL;
}
/**
static void gfs2_write_super(struct super_block *sb)
{
- struct gfs2_sbd *sdp = get_v2sdp(sb);
+ struct gfs2_sbd *sdp = sb->s_fs_info;
gfs2_log_flush(sdp);
}
static void gfs2_write_super_lockfs(struct super_block *sb)
{
- struct gfs2_sbd *sdp = get_v2sdp(sb);
+ struct gfs2_sbd *sdp = sb->s_fs_info;
int error;
for (;;) {
static void gfs2_unlockfs(struct super_block *sb)
{
- struct gfs2_sbd *sdp = get_v2sdp(sb);
+ struct gfs2_sbd *sdp = sb->s_fs_info;
gfs2_unfreeze_fs(sdp);
}
static int gfs2_statfs(struct super_block *sb, struct kstatfs *buf)
{
- struct gfs2_sbd *sdp = get_v2sdp(sb);
+ struct gfs2_sbd *sdp = sb->s_fs_info;
struct gfs2_statfs_change sc;
int error;
static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data)
{
- struct gfs2_sbd *sdp = get_v2sdp(sb);
+ struct gfs2_sbd *sdp = sb->s_fs_info;
int error;
error = gfs2_mount_args(sdp, data, 1);
static void gfs2_clear_inode(struct inode *inode)
{
- struct gfs2_inode *ip = get_v2ip(inode);
+ struct gfs2_inode *ip = inode->u.generic_ip;
if (ip) {
spin_lock(&ip->i_spin);
ip->i_vnode = NULL;
- set_v2ip(inode, NULL);
+ inode->u.generic_ip = NULL;
spin_unlock(&ip->i_spin);
gfs2_glock_schedule_for_reclaim(ip->i_gl);
static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt)
{
- struct gfs2_sbd *sdp = get_v2sdp(mnt->mnt_sb);
+ struct gfs2_sbd *sdp = mnt->mnt_sb->s_fs_info;
struct gfs2_args *args = &sdp->sd_args;
if (args->ar_lockproto[0])