diff options
author | Tiger Yang <tiger.yang@oracle.com> | 2010-01-25 01:11:06 -0500 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2010-02-26 18:41:07 -0500 |
commit | b89c54282db0c8634a2d2dc200f196d571750ce5 (patch) | |
tree | fbb34a01b3f0b2f4af6aae9ede9f3f21ef2a378d /fs/ocfs2/refcounttree.c | |
parent | a5f28ae4df291d81d9d23066f88c55ca45e388d3 (diff) |
ocfs2: add extent block stealing for ocfs2 v5
This patch add extent block (metadata) stealing mechanism for
extent allocation. This mechanism is same as the inode stealing.
if no room in slot specific extent_alloc, we will try to
allocate extent block from the next slot.
Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Acked-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/refcounttree.c')
-rw-r--r-- | fs/ocfs2/refcounttree.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 8ae65c9c020c..fb6aa7acf54b 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c | |||
@@ -626,7 +626,7 @@ static int ocfs2_create_refcount_tree(struct inode *inode, | |||
626 | rb = (struct ocfs2_refcount_block *)new_bh->b_data; | 626 | rb = (struct ocfs2_refcount_block *)new_bh->b_data; |
627 | memset(rb, 0, inode->i_sb->s_blocksize); | 627 | memset(rb, 0, inode->i_sb->s_blocksize); |
628 | strcpy((void *)rb, OCFS2_REFCOUNT_BLOCK_SIGNATURE); | 628 | strcpy((void *)rb, OCFS2_REFCOUNT_BLOCK_SIGNATURE); |
629 | rb->rf_suballoc_slot = cpu_to_le16(osb->slot_num); | 629 | rb->rf_suballoc_slot = cpu_to_le16(meta_ac->ac_alloc_slot); |
630 | rb->rf_suballoc_bit = cpu_to_le16(suballoc_bit_start); | 630 | rb->rf_suballoc_bit = cpu_to_le16(suballoc_bit_start); |
631 | rb->rf_fs_generation = cpu_to_le32(osb->fs_generation); | 631 | rb->rf_fs_generation = cpu_to_le32(osb->fs_generation); |
632 | rb->rf_blkno = cpu_to_le64(first_blkno); | 632 | rb->rf_blkno = cpu_to_le64(first_blkno); |
@@ -1330,7 +1330,7 @@ static int ocfs2_expand_inline_ref_root(handle_t *handle, | |||
1330 | memcpy(new_bh->b_data, ref_root_bh->b_data, sb->s_blocksize); | 1330 | memcpy(new_bh->b_data, ref_root_bh->b_data, sb->s_blocksize); |
1331 | 1331 | ||
1332 | new_rb = (struct ocfs2_refcount_block *)new_bh->b_data; | 1332 | new_rb = (struct ocfs2_refcount_block *)new_bh->b_data; |
1333 | new_rb->rf_suballoc_slot = cpu_to_le16(OCFS2_SB(sb)->slot_num); | 1333 | new_rb->rf_suballoc_slot = cpu_to_le16(meta_ac->ac_alloc_slot); |
1334 | new_rb->rf_suballoc_bit = cpu_to_le16(suballoc_bit_start); | 1334 | new_rb->rf_suballoc_bit = cpu_to_le16(suballoc_bit_start); |
1335 | new_rb->rf_blkno = cpu_to_le64(blkno); | 1335 | new_rb->rf_blkno = cpu_to_le64(blkno); |
1336 | new_rb->rf_cpos = cpu_to_le32(0); | 1336 | new_rb->rf_cpos = cpu_to_le32(0); |
@@ -1576,7 +1576,7 @@ static int ocfs2_new_leaf_refcount_block(handle_t *handle, | |||
1576 | new_rb = (struct ocfs2_refcount_block *)new_bh->b_data; | 1576 | new_rb = (struct ocfs2_refcount_block *)new_bh->b_data; |
1577 | memset(new_rb, 0, sb->s_blocksize); | 1577 | memset(new_rb, 0, sb->s_blocksize); |
1578 | strcpy((void *)new_rb, OCFS2_REFCOUNT_BLOCK_SIGNATURE); | 1578 | strcpy((void *)new_rb, OCFS2_REFCOUNT_BLOCK_SIGNATURE); |
1579 | new_rb->rf_suballoc_slot = cpu_to_le16(OCFS2_SB(sb)->slot_num); | 1579 | new_rb->rf_suballoc_slot = cpu_to_le16(meta_ac->ac_alloc_slot); |
1580 | new_rb->rf_suballoc_bit = cpu_to_le16(suballoc_bit_start); | 1580 | new_rb->rf_suballoc_bit = cpu_to_le16(suballoc_bit_start); |
1581 | new_rb->rf_fs_generation = cpu_to_le32(OCFS2_SB(sb)->fs_generation); | 1581 | new_rb->rf_fs_generation = cpu_to_le32(OCFS2_SB(sb)->fs_generation); |
1582 | new_rb->rf_blkno = cpu_to_le64(blkno); | 1582 | new_rb->rf_blkno = cpu_to_le64(blkno); |