diff options
Diffstat (limited to 'fs/gfs2/recovery.c')
| -rw-r--r-- | fs/gfs2/recovery.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c index c504ac1b831d..7aabc03e4abd 100644 --- a/fs/gfs2/recovery.c +++ b/fs/gfs2/recovery.c | |||
| @@ -32,14 +32,14 @@ | |||
| 32 | int gfs2_replay_read_block(struct gfs2_jdesc *jd, unsigned int blk, | 32 | int gfs2_replay_read_block(struct gfs2_jdesc *jd, unsigned int blk, |
| 33 | struct buffer_head **bh) | 33 | struct buffer_head **bh) |
| 34 | { | 34 | { |
| 35 | struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; | 35 | struct gfs2_inode *ip = GFS2_I(jd->jd_inode); |
| 36 | struct gfs2_glock *gl = ip->i_gl; | 36 | struct gfs2_glock *gl = ip->i_gl; |
| 37 | int new = 0; | 37 | int new = 0; |
| 38 | uint64_t dblock; | 38 | uint64_t dblock; |
| 39 | uint32_t extlen; | 39 | uint32_t extlen; |
| 40 | int error; | 40 | int error; |
| 41 | 41 | ||
| 42 | error = gfs2_extent_map(ip->i_vnode, blk, &new, &dblock, &extlen); | 42 | error = gfs2_extent_map(&ip->i_inode, blk, &new, &dblock, &extlen); |
| 43 | if (error) | 43 | if (error) |
| 44 | return error; | 44 | return error; |
| 45 | if (!dblock) { | 45 | if (!dblock) { |
| @@ -190,7 +190,7 @@ static int find_good_lh(struct gfs2_jdesc *jd, unsigned int *blk, | |||
| 190 | *blk = 0; | 190 | *blk = 0; |
| 191 | 191 | ||
| 192 | if (*blk == orig_blk) { | 192 | if (*blk == orig_blk) { |
| 193 | gfs2_consist_inode(jd->jd_inode->u.generic_ip); | 193 | gfs2_consist_inode(GFS2_I(jd->jd_inode)); |
| 194 | return -EIO; | 194 | return -EIO; |
| 195 | } | 195 | } |
| 196 | } | 196 | } |
| @@ -224,7 +224,7 @@ static int jhead_scan(struct gfs2_jdesc *jd, struct gfs2_log_header *head) | |||
| 224 | continue; | 224 | continue; |
| 225 | 225 | ||
| 226 | if (lh.lh_sequence == head->lh_sequence) { | 226 | if (lh.lh_sequence == head->lh_sequence) { |
| 227 | gfs2_consist_inode(jd->jd_inode->u.generic_ip); | 227 | gfs2_consist_inode(GFS2_I(jd->jd_inode)); |
| 228 | return -EIO; | 228 | return -EIO; |
| 229 | } | 229 | } |
| 230 | if (lh.lh_sequence < head->lh_sequence) | 230 | if (lh.lh_sequence < head->lh_sequence) |
| @@ -300,8 +300,7 @@ int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header *head) | |||
| 300 | static int foreach_descriptor(struct gfs2_jdesc *jd, unsigned int start, | 300 | static int foreach_descriptor(struct gfs2_jdesc *jd, unsigned int start, |
| 301 | unsigned int end, int pass) | 301 | unsigned int end, int pass) |
| 302 | { | 302 | { |
| 303 | struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; | 303 | struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); |
| 304 | struct gfs2_sbd *sdp = ip->i_sbd; | ||
| 305 | struct buffer_head *bh; | 304 | struct buffer_head *bh; |
| 306 | struct gfs2_log_descriptor *ld; | 305 | struct gfs2_log_descriptor *ld; |
| 307 | int error = 0; | 306 | int error = 0; |
| @@ -330,7 +329,7 @@ static int foreach_descriptor(struct gfs2_jdesc *jd, unsigned int start, | |||
| 330 | continue; | 329 | continue; |
| 331 | } | 330 | } |
| 332 | if (error == 1) { | 331 | if (error == 1) { |
| 333 | gfs2_consist_inode(jd->jd_inode->u.generic_ip); | 332 | gfs2_consist_inode(GFS2_I(jd->jd_inode)); |
| 334 | error = -EIO; | 333 | error = -EIO; |
| 335 | } | 334 | } |
| 336 | brelse(bh); | 335 | brelse(bh); |
| @@ -367,8 +366,8 @@ static int foreach_descriptor(struct gfs2_jdesc *jd, unsigned int start, | |||
| 367 | 366 | ||
| 368 | static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head) | 367 | static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head) |
| 369 | { | 368 | { |
| 370 | struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; | 369 | struct gfs2_inode *ip = GFS2_I(jd->jd_inode); |
| 371 | struct gfs2_sbd *sdp = ip->i_sbd; | 370 | struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); |
| 372 | unsigned int lblock; | 371 | unsigned int lblock; |
| 373 | int new = 0; | 372 | int new = 0; |
| 374 | uint64_t dblock; | 373 | uint64_t dblock; |
| @@ -380,7 +379,7 @@ static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head) | |||
| 380 | 379 | ||
| 381 | lblock = head->lh_blkno; | 380 | lblock = head->lh_blkno; |
| 382 | gfs2_replay_incr_blk(sdp, &lblock); | 381 | gfs2_replay_incr_blk(sdp, &lblock); |
| 383 | error = gfs2_block_map(ip->i_vnode, lblock, &new, &dblock, &boundary); | 382 | error = gfs2_block_map(&ip->i_inode, lblock, &new, &dblock, &boundary); |
| 384 | if (error) | 383 | if (error) |
| 385 | return error; | 384 | return error; |
| 386 | if (!dblock) { | 385 | if (!dblock) { |
| @@ -426,8 +425,8 @@ static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head) | |||
| 426 | 425 | ||
| 427 | int gfs2_recover_journal(struct gfs2_jdesc *jd) | 426 | int gfs2_recover_journal(struct gfs2_jdesc *jd) |
| 428 | { | 427 | { |
| 429 | struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; | 428 | struct gfs2_inode *ip = GFS2_I(jd->jd_inode); |
| 430 | struct gfs2_sbd *sdp = ip->i_sbd; | 429 | struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); |
| 431 | struct gfs2_log_header head; | 430 | struct gfs2_log_header head; |
| 432 | struct gfs2_holder j_gh, ji_gh, t_gh; | 431 | struct gfs2_holder j_gh, ji_gh, t_gh; |
| 433 | unsigned long t; | 432 | unsigned long t; |
