- 23 Sep, 2009 14 commits
-
-
Tao Ma authored
Given a physical cpos and length, decrement the refcount in the tree. If the refcount for any portion of the extent goes to zero, that portion is queued for freeing. Signed-off-by: Tao Ma <tao.ma@oracle.com>
-
Tao Ma authored
Given a physical cpos and length, increment the refcount in the tree. If the extent has not been seen before, a refcount record is created for it. Refcount records may be merged or split by this operation. Signed-off-by: Tao Ma <tao.ma@oracle.com>
-
Tao Ma authored
Now fs/ocfs2/alloc.c has more than 7000 lines. It contains our basic b-tree operation. Although we have already make our b-tree operation generic, the basic structrue ocfs2_path which is used to iterate one b-tree branch is still static and limited to only used in alloc.c. As refcount tree need them and I don't want to add any more b-tree unrelated code to alloc.c, export them out. Signed-off-by: Tao Ma <tao.ma@oracle.com>
-
Tao Ma authored
Add refcount b-tree as a new extent tree so that it can use the b-tree to store and maniuplate ocfs2_refcount_rec. Signed-off-by: Tao Ma <tao.ma@oracle.com>
-
Tao Ma authored
ocfs2_mark_extent_written actually does the following things: 1. check the parameters. 2. initialize the left_path and split_rec. 3. call __ocfs2_mark_extent_written. it will do: 1) check the flags of unwritten 2) do the real split work. The whole process is packed tightly somehow. So this patch will abstract 2 different functions so that future b-tree operation can work with it. 1. __ocfs2_split_extent will accept path and split_rec and do the real split work. 2. ocfs2_change_extent_flag will accept a new flag and initialize path and split_rec. So now ocfs2_mark_extent_written will do: 1. check the parameters. 2. call ocfs2_change_extent_flag. 1) initalize the left_path and split_rec. 2) check whether the new flags conflict with the old one. 3) call __ocfs2_split_extent to do the split. Signed-off-by: Tao Ma <tao.ma@oracle.com>
-
Tao Ma authored
Add a new operation eo_ocfs2_extent_contig int the extent tree's operations vector. So that with the new refcount tree, We want this so that refcount trees can always return CONTIG_NONE and prevent extent merging. Signed-off-by: Tao Ma <tao.ma@oracle.com>
-
Tao Ma authored
Add basic refcount tree root operation. Signed-off-by: Tao Ma <tao.ma@oracle.com>
-
Tao Ma authored
Implement locking around struct ocfs2_refcount_tree. This protects all read/write operations on refcount trees. ocfs2_refcount_tree has its own lock and its own caching_info, protecting buffers among multiple nodes. User must call ocfs2_lock_refcount_tree before his operation on the tree and unlock it after that. ocfs2_refcount_trees are referenced by the block number of the refcount tree root block, So we create an rb-tree on the ocfs2_super to look them up. Signed-off-by: Tao Ma <tao.ma@oracle.com>
-
Tao Ma authored
refcount tree should use its own caching info so that when we downconvert the refcount tree lock, we can drop all the cached buffer head. Signed-off-by: Tao Ma <tao.ma@oracle.com>
-
Tao Ma authored
refcount tree lock resource is used to protect refcount tree read/write among multiple nodes. Signed-off-by: Tao Ma <tao.ma@oracle.com>
-
Tao Ma authored
In meta downconvert, we need to checkpoint the metadata in an inode. For refcount tree, we also need it. So abstract the process out. Signed-off-by: Tao Ma <tao.ma@oracle.com>
-
Tao Ma authored
Signed-off-by: Tao Ma <tao.ma@oracle.com>
-
Tao Ma authored
Add metaecc and journal trigger for ocfs2_refcount_block. Signed-off-by: Tao Ma <tao.ma@oracle.com>
-
Tao Ma authored
Signed-off-by: Tao Ma <tao.ma@oracle.com>
-
- 04 Sep, 2009 26 commits
-
-
Joel Becker authored
With this commit, extent tree operations are divorced from inodes and rely on ocfs2_caching_info. Phew! Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
We only allow unwritten extents on data, so the toplevel ocfs2_mark_extent_written() can use an inode all it wants. But the subfunction isn't even using the inode argument. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
Don't use a struct inode anymore. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
It already has an extent_tree. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
One more generic btree function that is isolated from struct inode. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
One more function that doesn't need a struct inode to pass to its children. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
One more function down, no inode in the entire insert-extent chain. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
ocfs2_insert_extent() wants to insert a record into the extent map if it's an inode data extent. But since many btrees can call that function, let's make it an op on ocfs2_extent_tree. Other tree types can leave it empty. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
It's not using it, so remove it from the parameter list. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
It already has an ocfs2_extent_tree and doesn't need the inode. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
We don't want struct inode in generic btree operations. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
Don't pass the inode in. We don't want it around for generic btree operations. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
They aren't using it, so remove it from their parameter lists. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
Another on the way to generic btree functions. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
Give it an ocfs2_extent_tree and it is happy. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
ocfs2_remove_extent() wants to truncate the extent map if it's truncating an inode data extent. But since many btrees can call that function, let's make it an op on ocfs2_extent_tree. Other tree types can leave it empty. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
It's not using it anymore. Remove it from the parameter list. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
ocfs2_grow_branch() not really using it other than to pass it to the subfunctions ocfs2_shift_tree_depth(), ocfs2_find_branch_target(), and ocfs2_add_branch(). The first two weren't it either, so they drop the argument. ocfs2_add_branch() only passed it to ocfs2_adjust_rightmost_branch(), which drops the inode argument and uses the ocfs2_extent_tree as well. ocfs2_append_rec_to_path() can be take an ocfs2_extent_tree instead of the inode. The function ocfs2_adjust_rightmost_records() goes along for the ride. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
It's not using it, so remove it from the parameter list. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
Drop it from the parameters - they already have ocfs2_extent_list. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
It already gets ocfs2_extent_tree, so we can just use that. This chains to the same modification for ocfs2_remove_rightmost_path() and ocfs2_rotate_rightmost_leaf_left(). Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
It already has struct ocfs2_extent_tree, which has the caching info. So we don't need to pass it struct inode. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
It already has struct ocfs2_extent_tree, which has the caching info. So we don't need to pass it struct inode. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
Pass in the extent tree, which is all we need. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
We don't need struct inode in ocfs2_rotate_tree_right() anymore. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-
Joel Becker authored
We can get to the inode from the caching information. Other parent types don't need it. Signed-off-by: Joel Becker <joel.becker@oracle.com>
-