#include <linux/buffer_head.h>
#include <linux/gfs2_ondisk.h>
#include <linux/crc32.h>
+#include <linux/lm_interface.h>
#include "gfs2.h"
-#include "lm_interface.h"
#include "incore.h"
#include "bmap.h"
#include "glock.h"
struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
struct gfs2_glock *gl = ip->i_gl;
int new = 0;
- uint64_t dblock;
- uint32_t extlen;
+ u64 dblock;
+ u32 extlen;
int error;
error = gfs2_extent_map(&ip->i_inode, blk, &new, &dblock, &extlen);
return error;
}
-int gfs2_revoke_add(struct gfs2_sbd *sdp, uint64_t blkno, unsigned int where)
+int gfs2_revoke_add(struct gfs2_sbd *sdp, u64 blkno, unsigned int where)
{
struct list_head *head = &sdp->sd_revoke_list;
struct gfs2_revoke_replay *rr;
return 1;
}
-int gfs2_revoke_check(struct gfs2_sbd *sdp, uint64_t blkno, unsigned int where)
+int gfs2_revoke_check(struct gfs2_sbd *sdp, u64 blkno, unsigned int where)
{
struct gfs2_revoke_replay *rr;
int wrap, a, b, revoke;
{
struct buffer_head *bh;
struct gfs2_log_header lh;
- uint32_t hash;
+ u32 hash;
int error;
error = gfs2_replay_read_block(jd, blk, &bh);
int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header *head)
{
struct gfs2_log_header lh_1, lh_m;
- uint32_t blk_1, blk_2, blk_m;
+ u32 blk_1, blk_2, blk_m;
int error;
blk_1 = 0;
u32 length;
__be64 *ptr;
unsigned int offset = sizeof(struct gfs2_log_descriptor);
- offset += (sizeof(__be64)-1);
- offset &= ~(sizeof(__be64)-1);
+ offset += sizeof(__be64) - 1;
+ offset &= ~(sizeof(__be64) - 1);
while (start != end) {
error = gfs2_replay_read_block(jd, start, &bh);
struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
unsigned int lblock;
- int new = 0;
- uint64_t dblock;
struct gfs2_log_header *lh;
- uint32_t hash;
+ u32 hash;
struct buffer_head *bh;
int error;
- int boundary;
+ struct buffer_head bh_map;
lblock = head->lh_blkno;
gfs2_replay_incr_blk(sdp, &lblock);
- error = gfs2_block_map(&ip->i_inode, lblock, &new, &dblock, &boundary);
+ error = gfs2_block_map(&ip->i_inode, lblock, 0, &bh_map, 1);
if (error)
return error;
- if (!dblock) {
+ if (!bh_map.b_blocknr) {
gfs2_consist_inode(ip);
return -EIO;
}
- bh = sb_getblk(sdp->sd_vfs, dblock);
+ bh = sb_getblk(sdp->sd_vfs, bh_map.b_blocknr);
lock_buffer(bh);
memset(bh->b_data, 0, bh->b_size);
set_buffer_uptodate(bh);