/*
* Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
- * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved.
*
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
#include <linux/buffer_head.h>
#include <linux/mm.h>
#include <linux/pagemap.h>
-#include <asm/semaphore.h>
+#include <linux/gfs2_ondisk.h>
#include "gfs2.h"
+#include "lm_interface.h"
+#include "incore.h"
#include "bmap.h"
#include "glock.h"
#include "inode.h"
#include "quota.h"
#include "rgrp.h"
#include "trans.h"
+#include "util.h"
static void pfault_be_greedy(struct gfs2_inode *ip)
{
static struct page *gfs2_private_nopage(struct vm_area_struct *area,
unsigned long address, int *type)
{
- struct gfs2_inode *ip = get_v2ip(area->vm_file->f_mapping->host);
+ struct gfs2_inode *ip = area->vm_file->f_mapping->host->u.generic_ip;
struct gfs2_holder i_gh;
struct page *result;
int error;
if (error)
goto out_gunlock_q;
- gfs2_write_calc_reserv(ip, PAGE_CACHE_SIZE,
- &data_blocks, &ind_blocks);
+ gfs2_write_calc_reserv(ip, PAGE_CACHE_SIZE, &data_blocks, &ind_blocks);
al->al_requested = data_blocks + ind_blocks;
if (error)
goto out_gunlock_q;
- error = gfs2_trans_begin(sdp,
- al->al_rgd->rd_ri.ri_length +
+ error = gfs2_trans_begin(sdp, al->al_rgd->rd_ri.ri_length +
ind_blocks + RES_DINODE +
RES_STATFS + RES_QUOTA, 0);
if (error)
unsigned int extlen;
int new = 1;
- error = gfs2_block_map(ip, lblock, &new, &dblock, &extlen);
+ error = gfs2_extent_map(ip->i_vnode, lblock, &new, &dblock, &extlen);
if (error)
goto out_trans;
static struct page *gfs2_sharewrite_nopage(struct vm_area_struct *area,
unsigned long address, int *type)
{
- struct gfs2_inode *ip = get_v2ip(area->vm_file->f_mapping->host);
+ struct gfs2_inode *ip = area->vm_file->f_mapping->host->u.generic_ip;
struct gfs2_holder i_gh;
struct page *result = NULL;
unsigned long index = ((address - area->vm_start) >> PAGE_CACHE_SHIFT) +