diff options
author | Joel Becker <joel.becker@oracle.com> | 2009-02-13 06:24:43 -0500 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2009-09-04 19:08:09 -0400 |
commit | cc79d8c19e9d39446525a1026f1a21761f5d3cd2 (patch) | |
tree | 3c9788c2e5ef0c51734dad8186ecd83bf4dd6584 /fs/ocfs2/alloc.c | |
parent | 92ba470c44c1404ff18ca0f4ecce1e5b116bb933 (diff) |
ocfs2: ocfs2_insert_extent() no longer needs struct inode.
One more function down, no inode in the entire insert-extent chain.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/alloc.c')
-rw-r--r-- | fs/ocfs2/alloc.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index ed869889c4fb..c4943b91c7a4 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -4681,13 +4681,11 @@ out: | |||
4681 | } | 4681 | } |
4682 | 4682 | ||
4683 | /* | 4683 | /* |
4684 | * Insert an extent into an inode btree. | 4684 | * Insert an extent into a btree. |
4685 | * | 4685 | * |
4686 | * The caller needs to update fe->i_clusters | 4686 | * The caller needs to update the owning btree's cluster count. |
4687 | */ | 4687 | */ |
4688 | int ocfs2_insert_extent(struct ocfs2_super *osb, | 4688 | int ocfs2_insert_extent(handle_t *handle, |
4689 | handle_t *handle, | ||
4690 | struct inode *inode, | ||
4691 | struct ocfs2_extent_tree *et, | 4689 | struct ocfs2_extent_tree *et, |
4692 | u32 cpos, | 4690 | u32 cpos, |
4693 | u64 start_blk, | 4691 | u64 start_blk, |
@@ -4701,8 +4699,9 @@ int ocfs2_insert_extent(struct ocfs2_super *osb, | |||
4701 | struct ocfs2_insert_type insert = {0, }; | 4699 | struct ocfs2_insert_type insert = {0, }; |
4702 | struct ocfs2_extent_rec rec; | 4700 | struct ocfs2_extent_rec rec; |
4703 | 4701 | ||
4704 | mlog(0, "add %u clusters at position %u to inode %llu\n", | 4702 | mlog(0, "add %u clusters at position %u to owner %llu\n", |
4705 | new_clusters, cpos, (unsigned long long)OCFS2_I(inode)->ip_blkno); | 4703 | new_clusters, cpos, |
4704 | (unsigned long long)ocfs2_metadata_cache_owner(et->et_ci)); | ||
4706 | 4705 | ||
4707 | memset(&rec, 0, sizeof(rec)); | 4706 | memset(&rec, 0, sizeof(rec)); |
4708 | rec.e_cpos = cpu_to_le32(cpos); | 4707 | rec.e_cpos = cpu_to_le32(cpos); |
@@ -4829,8 +4828,7 @@ int ocfs2_add_clusters_in_btree(struct ocfs2_super *osb, | |||
4829 | block = ocfs2_clusters_to_blocks(osb->sb, bit_off); | 4828 | block = ocfs2_clusters_to_blocks(osb->sb, bit_off); |
4830 | mlog(0, "Allocating %u clusters at block %u for inode %llu\n", | 4829 | mlog(0, "Allocating %u clusters at block %u for inode %llu\n", |
4831 | num_bits, bit_off, (unsigned long long)OCFS2_I(inode)->ip_blkno); | 4830 | num_bits, bit_off, (unsigned long long)OCFS2_I(inode)->ip_blkno); |
4832 | status = ocfs2_insert_extent(osb, handle, inode, et, | 4831 | status = ocfs2_insert_extent(handle, et, *logical_offset, block, |
4833 | *logical_offset, block, | ||
4834 | num_bits, flags, meta_ac); | 4832 | num_bits, flags, meta_ac); |
4835 | if (status < 0) { | 4833 | if (status < 0) { |
4836 | mlog_errno(status); | 4834 | mlog_errno(status); |
@@ -7244,8 +7242,7 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode, | |||
7244 | * the in-inode data from our pages. | 7242 | * the in-inode data from our pages. |
7245 | */ | 7243 | */ |
7246 | ocfs2_init_dinode_extent_tree(&et, inode, di_bh); | 7244 | ocfs2_init_dinode_extent_tree(&et, inode, di_bh); |
7247 | ret = ocfs2_insert_extent(osb, handle, inode, &et, | 7245 | ret = ocfs2_insert_extent(handle, &et, 0, block, 1, 0, NULL); |
7248 | 0, block, 1, 0, NULL); | ||
7249 | if (ret) { | 7246 | if (ret) { |
7250 | mlog_errno(ret); | 7247 | mlog_errno(ret); |
7251 | goto out_commit; | 7248 | goto out_commit; |