diff options
-rw-r--r-- | fs/ocfs2/suballoc.c | 7 | ||||
-rw-r--r-- | fs/ocfs2/suballoc.h | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index f169da4624fd..b7e74b580c0f 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c | |||
@@ -642,7 +642,7 @@ ocfs2_block_group_alloc_discontig(handle_t *handle, | |||
642 | * cluster groups will be staying in cache for the duration of | 642 | * cluster groups will be staying in cache for the duration of |
643 | * this operation. | 643 | * this operation. |
644 | */ | 644 | */ |
645 | ac->ac_allow_chain_relink = 0; | 645 | ac->ac_disable_chain_relink = 1; |
646 | 646 | ||
647 | /* Claim the first region */ | 647 | /* Claim the first region */ |
648 | status = ocfs2_block_group_claim_bits(osb, handle, ac, min_bits, | 648 | status = ocfs2_block_group_claim_bits(osb, handle, ac, min_bits, |
@@ -1823,7 +1823,7 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac, | |||
1823 | * Do this *after* figuring out how many bits we're taking out | 1823 | * Do this *after* figuring out how many bits we're taking out |
1824 | * of our target group. | 1824 | * of our target group. |
1825 | */ | 1825 | */ |
1826 | if (ac->ac_allow_chain_relink && | 1826 | if (!ac->ac_disable_chain_relink && |
1827 | (prev_group_bh) && | 1827 | (prev_group_bh) && |
1828 | (ocfs2_block_group_reasonably_empty(bg, res->sr_bits))) { | 1828 | (ocfs2_block_group_reasonably_empty(bg, res->sr_bits))) { |
1829 | status = ocfs2_relink_block_group(handle, alloc_inode, | 1829 | status = ocfs2_relink_block_group(handle, alloc_inode, |
@@ -1928,7 +1928,6 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *ac, | |||
1928 | 1928 | ||
1929 | victim = ocfs2_find_victim_chain(cl); | 1929 | victim = ocfs2_find_victim_chain(cl); |
1930 | ac->ac_chain = victim; | 1930 | ac->ac_chain = victim; |
1931 | ac->ac_allow_chain_relink = 1; | ||
1932 | 1931 | ||
1933 | status = ocfs2_search_chain(ac, handle, bits_wanted, min_bits, | 1932 | status = ocfs2_search_chain(ac, handle, bits_wanted, min_bits, |
1934 | res, &bits_left); | 1933 | res, &bits_left); |
@@ -1947,7 +1946,7 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *ac, | |||
1947 | * searching each chain in order. Don't allow chain relinking | 1946 | * searching each chain in order. Don't allow chain relinking |
1948 | * because we only calculate enough journal credits for one | 1947 | * because we only calculate enough journal credits for one |
1949 | * relink per alloc. */ | 1948 | * relink per alloc. */ |
1950 | ac->ac_allow_chain_relink = 0; | 1949 | ac->ac_disable_chain_relink = 1; |
1951 | for (i = 0; i < le16_to_cpu(cl->cl_next_free_rec); i ++) { | 1950 | for (i = 0; i < le16_to_cpu(cl->cl_next_free_rec); i ++) { |
1952 | if (i == victim) | 1951 | if (i == victim) |
1953 | continue; | 1952 | continue; |
diff --git a/fs/ocfs2/suballoc.h b/fs/ocfs2/suballoc.h index b8afabfeede4..a36d0aa50911 100644 --- a/fs/ocfs2/suballoc.h +++ b/fs/ocfs2/suballoc.h | |||
@@ -49,7 +49,7 @@ struct ocfs2_alloc_context { | |||
49 | 49 | ||
50 | /* these are used by the chain search */ | 50 | /* these are used by the chain search */ |
51 | u16 ac_chain; | 51 | u16 ac_chain; |
52 | int ac_allow_chain_relink; | 52 | int ac_disable_chain_relink; |
53 | group_search_t *ac_group_search; | 53 | group_search_t *ac_group_search; |
54 | 54 | ||
55 | u64 ac_last_group; | 55 | u64 ac_last_group; |