aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/alloc.c
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2009-02-10 23:00:41 -0500
committerJoel Becker <joel.becker@oracle.com>2009-09-04 19:07:48 -0400
commit8cb471e8f82506937fe5e2e9fb0bf90f6b1f1170 (patch)
treee275a8f5db101a9990ba44931cfd116123112b11 /fs/ocfs2/alloc.c
parent6e5a3d7538ad4e46a976862f593faf65750e37cc (diff)
ocfs2: Take the inode out of the metadata read/write paths.
We are really passing the inode into the ocfs2_read/write_blocks() functions to get at the metadata cache. This commit passes the cache directly into the metadata block functions, divorcing them from the inode. Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/alloc.c')
-rw-r--r--fs/ocfs2/alloc.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index ab513ddaeff2..d5dffcfa192a 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -859,7 +859,7 @@ int ocfs2_read_extent_block(struct inode *inode, u64 eb_blkno,
859 int rc; 859 int rc;
860 struct buffer_head *tmp = *bh; 860 struct buffer_head *tmp = *bh;
861 861
862 rc = ocfs2_read_block(inode, eb_blkno, &tmp, 862 rc = ocfs2_read_block(INODE_CACHE(inode), eb_blkno, &tmp,
863 ocfs2_validate_extent_block); 863 ocfs2_validate_extent_block);
864 864
865 /* If ocfs2_read_block() got us a new bh, pass it up. */ 865 /* If ocfs2_read_block() got us a new bh, pass it up. */
@@ -949,7 +949,8 @@ static int ocfs2_create_new_meta_bhs(struct ocfs2_super *osb,
949 mlog_errno(status); 949 mlog_errno(status);
950 goto bail; 950 goto bail;
951 } 951 }
952 ocfs2_set_new_buffer_uptodate(inode, bhs[i]); 952 ocfs2_set_new_buffer_uptodate(INODE_CACHE(inode),
953 bhs[i]);
953 954
954 status = ocfs2_journal_access_eb(handle, inode, bhs[i], 955 status = ocfs2_journal_access_eb(handle, inode, bhs[i],
955 OCFS2_JOURNAL_ACCESS_CREATE); 956 OCFS2_JOURNAL_ACCESS_CREATE);
@@ -2559,7 +2560,7 @@ static void ocfs2_unlink_path(struct inode *inode, handle_t *handle,
2559 le16_to_cpu(el->l_next_free_rec)); 2560 le16_to_cpu(el->l_next_free_rec));
2560 2561
2561 ocfs2_journal_dirty(handle, bh); 2562 ocfs2_journal_dirty(handle, bh);
2562 ocfs2_remove_from_cache(inode, bh); 2563 ocfs2_remove_from_cache(INODE_CACHE(inode), bh);
2563 continue; 2564 continue;
2564 } 2565 }
2565 2566
@@ -2572,7 +2573,7 @@ static void ocfs2_unlink_path(struct inode *inode, handle_t *handle,
2572 if (ret) 2573 if (ret)
2573 mlog_errno(ret); 2574 mlog_errno(ret);
2574 2575
2575 ocfs2_remove_from_cache(inode, bh); 2576 ocfs2_remove_from_cache(INODE_CACHE(inode), bh);
2576 } 2577 }
2577} 2578}
2578 2579
@@ -6010,7 +6011,7 @@ int ocfs2_begin_truncate_log_recovery(struct ocfs2_super *osb,
6010 tl->tl_used = 0; 6011 tl->tl_used = 0;
6011 6012
6012 ocfs2_compute_meta_ecc(osb->sb, tl_bh->b_data, &di->i_check); 6013 ocfs2_compute_meta_ecc(osb->sb, tl_bh->b_data, &di->i_check);
6013 status = ocfs2_write_block(osb, tl_bh, tl_inode); 6014 status = ocfs2_write_block(osb, tl_bh, INODE_CACHE(tl_inode));
6014 if (status < 0) { 6015 if (status < 0) {
6015 mlog_errno(status); 6016 mlog_errno(status);
6016 goto bail; 6017 goto bail;
@@ -6719,7 +6720,7 @@ delete:
6719 6720
6720 mlog(0, "deleting this extent block.\n"); 6721 mlog(0, "deleting this extent block.\n");
6721 6722
6722 ocfs2_remove_from_cache(inode, bh); 6723 ocfs2_remove_from_cache(INODE_CACHE(inode), bh);
6723 6724
6724 BUG_ON(ocfs2_rec_clusters(el, &el->l_recs[0])); 6725 BUG_ON(ocfs2_rec_clusters(el, &el->l_recs[0]));
6725 BUG_ON(le32_to_cpu(el->l_recs[0].e_cpos)); 6726 BUG_ON(le32_to_cpu(el->l_recs[0].e_cpos));