Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165089
b: refs/heads/master
c: a297029
h: refs/heads/master
i:
  165087: f04bdf2
v: v3
  • Loading branch information
Joel Becker committed Sep 4, 2009
1 parent 4b06077 commit 4e6c571
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b4a176515c715f0c6db1759a39cd9c4175e5a23a
refs/heads/master: a29702914ad36443d83b5250b3bfa1bf91e6b239
26 changes: 13 additions & 13 deletions trunk/fs/ocfs2/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4312,7 +4312,8 @@ static int ocfs2_do_insert_extent(handle_t *handle,
}

static enum ocfs2_contig_type
ocfs2_figure_merge_contig_type(struct inode *inode, struct ocfs2_path *path,
ocfs2_figure_merge_contig_type(struct ocfs2_extent_tree *et,
struct ocfs2_path *path,
struct ocfs2_extent_list *el, int index,
struct ocfs2_extent_rec *split_rec)
{
Expand All @@ -4324,12 +4325,12 @@ ocfs2_figure_merge_contig_type(struct inode *inode, struct ocfs2_path *path,
struct ocfs2_path *left_path = NULL, *right_path = NULL;
struct buffer_head *bh;
struct ocfs2_extent_block *eb;
struct super_block *sb = ocfs2_metadata_cache_get_super(et->et_ci);

if (index > 0) {
rec = &el->l_recs[index - 1];
} else if (path->p_tree_depth > 0) {
status = ocfs2_find_cpos_for_left_leaf(inode->i_sb,
path, &left_cpos);
status = ocfs2_find_cpos_for_left_leaf(sb, path, &left_cpos);
if (status)
goto out;

Expand All @@ -4338,8 +4339,8 @@ ocfs2_figure_merge_contig_type(struct inode *inode, struct ocfs2_path *path,
if (!left_path)
goto out;

status = ocfs2_find_path(INODE_CACHE(inode),
left_path, left_cpos);
status = ocfs2_find_path(et->et_ci, left_path,
left_cpos);
if (status)
goto out;

Expand All @@ -4349,7 +4350,7 @@ ocfs2_figure_merge_contig_type(struct inode *inode, struct ocfs2_path *path,
le16_to_cpu(new_el->l_count)) {
bh = path_leaf_bh(left_path);
eb = (struct ocfs2_extent_block *)bh->b_data;
ocfs2_error(inode->i_sb,
ocfs2_error(sb,
"Extent block #%llu has an "
"invalid l_next_free_rec of "
"%d. It should have "
Expand All @@ -4374,7 +4375,7 @@ ocfs2_figure_merge_contig_type(struct inode *inode, struct ocfs2_path *path,
if (split_rec->e_cpos == el->l_recs[index].e_cpos)
ret = CONTIG_RIGHT;
} else {
ret = ocfs2_extent_contig(inode->i_sb, rec, split_rec);
ret = ocfs2_extent_contig(sb, rec, split_rec);
}
}

Expand All @@ -4383,8 +4384,7 @@ ocfs2_figure_merge_contig_type(struct inode *inode, struct ocfs2_path *path,
rec = &el->l_recs[index + 1];
else if (le16_to_cpu(el->l_next_free_rec) == le16_to_cpu(el->l_count) &&
path->p_tree_depth > 0) {
status = ocfs2_find_cpos_for_right_leaf(inode->i_sb,
path, &right_cpos);
status = ocfs2_find_cpos_for_right_leaf(sb, path, &right_cpos);
if (status)
goto out;

Expand All @@ -4395,7 +4395,7 @@ ocfs2_figure_merge_contig_type(struct inode *inode, struct ocfs2_path *path,
if (!right_path)
goto out;

status = ocfs2_find_path(INODE_CACHE(inode), right_path, right_cpos);
status = ocfs2_find_path(et->et_ci, right_path, right_cpos);
if (status)
goto out;

Expand All @@ -4405,7 +4405,7 @@ ocfs2_figure_merge_contig_type(struct inode *inode, struct ocfs2_path *path,
if (le16_to_cpu(new_el->l_next_free_rec) <= 1) {
bh = path_leaf_bh(right_path);
eb = (struct ocfs2_extent_block *)bh->b_data;
ocfs2_error(inode->i_sb,
ocfs2_error(sb,
"Extent block #%llu has an "
"invalid l_next_free_rec of %d",
(unsigned long long)le64_to_cpu(eb->h_blkno),
Expand All @@ -4420,7 +4420,7 @@ ocfs2_figure_merge_contig_type(struct inode *inode, struct ocfs2_path *path,
if (rec) {
enum ocfs2_contig_type contig_type;

contig_type = ocfs2_extent_contig(inode->i_sb, rec, split_rec);
contig_type = ocfs2_extent_contig(sb, rec, split_rec);

if (contig_type == CONTIG_LEFT && ret == CONTIG_RIGHT)
ret = CONTIG_LEFTRIGHT;
Expand Down Expand Up @@ -5035,7 +5035,7 @@ static int __ocfs2_mark_extent_written(struct inode *inode,
goto out;
}

ctxt.c_contig_type = ocfs2_figure_merge_contig_type(inode, path, el,
ctxt.c_contig_type = ocfs2_figure_merge_contig_type(et, path, el,
split_index,
split_rec);

Expand Down

0 comments on commit 4e6c571

Please sign in to comment.