diff options
Diffstat (limited to 'fs/ocfs2/localalloc.c')
-rw-r--r-- | fs/ocfs2/localalloc.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index 687b28713c32..ec70cdbe77fc 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "ocfs2.h" | 36 | #include "ocfs2.h" |
37 | 37 | ||
38 | #include "alloc.h" | 38 | #include "alloc.h" |
39 | #include "blockcheck.h" | ||
39 | #include "dlmglue.h" | 40 | #include "dlmglue.h" |
40 | #include "inode.h" | 41 | #include "inode.h" |
41 | #include "journal.h" | 42 | #include "journal.h" |
@@ -248,8 +249,8 @@ int ocfs2_load_local_alloc(struct ocfs2_super *osb) | |||
248 | goto bail; | 249 | goto bail; |
249 | } | 250 | } |
250 | 251 | ||
251 | status = ocfs2_read_blocks(inode, OCFS2_I(inode)->ip_blkno, 1, | 252 | status = ocfs2_read_inode_block_full(inode, &alloc_bh, |
252 | &alloc_bh, OCFS2_BH_IGNORE_CACHE); | 253 | OCFS2_BH_IGNORE_CACHE); |
253 | if (status < 0) { | 254 | if (status < 0) { |
254 | mlog_errno(status); | 255 | mlog_errno(status); |
255 | goto bail; | 256 | goto bail; |
@@ -382,8 +383,8 @@ void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb) | |||
382 | } | 383 | } |
383 | memcpy(alloc_copy, alloc, bh->b_size); | 384 | memcpy(alloc_copy, alloc, bh->b_size); |
384 | 385 | ||
385 | status = ocfs2_journal_access(handle, local_alloc_inode, bh, | 386 | status = ocfs2_journal_access_di(handle, local_alloc_inode, bh, |
386 | OCFS2_JOURNAL_ACCESS_WRITE); | 387 | OCFS2_JOURNAL_ACCESS_WRITE); |
387 | if (status < 0) { | 388 | if (status < 0) { |
388 | mlog_errno(status); | 389 | mlog_errno(status); |
389 | goto out_commit; | 390 | goto out_commit; |
@@ -459,8 +460,8 @@ int ocfs2_begin_local_alloc_recovery(struct ocfs2_super *osb, | |||
459 | 460 | ||
460 | mutex_lock(&inode->i_mutex); | 461 | mutex_lock(&inode->i_mutex); |
461 | 462 | ||
462 | status = ocfs2_read_blocks(inode, OCFS2_I(inode)->ip_blkno, 1, | 463 | status = ocfs2_read_inode_block_full(inode, &alloc_bh, |
463 | &alloc_bh, OCFS2_BH_IGNORE_CACHE); | 464 | OCFS2_BH_IGNORE_CACHE); |
464 | if (status < 0) { | 465 | if (status < 0) { |
465 | mlog_errno(status); | 466 | mlog_errno(status); |
466 | goto bail; | 467 | goto bail; |
@@ -476,6 +477,7 @@ int ocfs2_begin_local_alloc_recovery(struct ocfs2_super *osb, | |||
476 | alloc = (struct ocfs2_dinode *) alloc_bh->b_data; | 477 | alloc = (struct ocfs2_dinode *) alloc_bh->b_data; |
477 | ocfs2_clear_local_alloc(alloc); | 478 | ocfs2_clear_local_alloc(alloc); |
478 | 479 | ||
480 | ocfs2_compute_meta_ecc(osb->sb, alloc_bh->b_data, &alloc->i_check); | ||
479 | status = ocfs2_write_block(osb, alloc_bh, inode); | 481 | status = ocfs2_write_block(osb, alloc_bh, inode); |
480 | if (status < 0) | 482 | if (status < 0) |
481 | mlog_errno(status); | 483 | mlog_errno(status); |
@@ -762,9 +764,9 @@ int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, | |||
762 | * delete bits from it! */ | 764 | * delete bits from it! */ |
763 | *num_bits = bits_wanted; | 765 | *num_bits = bits_wanted; |
764 | 766 | ||
765 | status = ocfs2_journal_access(handle, local_alloc_inode, | 767 | status = ocfs2_journal_access_di(handle, local_alloc_inode, |
766 | osb->local_alloc_bh, | 768 | osb->local_alloc_bh, |
767 | OCFS2_JOURNAL_ACCESS_WRITE); | 769 | OCFS2_JOURNAL_ACCESS_WRITE); |
768 | if (status < 0) { | 770 | if (status < 0) { |
769 | mlog_errno(status); | 771 | mlog_errno(status); |
770 | goto bail; | 772 | goto bail; |
@@ -1240,9 +1242,9 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb, | |||
1240 | } | 1242 | } |
1241 | memcpy(alloc_copy, alloc, osb->local_alloc_bh->b_size); | 1243 | memcpy(alloc_copy, alloc, osb->local_alloc_bh->b_size); |
1242 | 1244 | ||
1243 | status = ocfs2_journal_access(handle, local_alloc_inode, | 1245 | status = ocfs2_journal_access_di(handle, local_alloc_inode, |
1244 | osb->local_alloc_bh, | 1246 | osb->local_alloc_bh, |
1245 | OCFS2_JOURNAL_ACCESS_WRITE); | 1247 | OCFS2_JOURNAL_ACCESS_WRITE); |
1246 | if (status < 0) { | 1248 | if (status < 0) { |
1247 | mlog_errno(status); | 1249 | mlog_errno(status); |
1248 | goto bail; | 1250 | goto bail; |