1. 23 9月, 2009 12 次提交
    • T
      ocfs2: move tree path functions to alloc.h. · e2e9f608
      Tao Ma 提交于
      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> 
      e2e9f608
    • T
      ocfs2: Add refcount b-tree as a new extent tree. · fe924415
      Tao Ma 提交于
      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: NTao Ma <tao.ma@oracle.com>
      fe924415
    • T
      ocfs2: Abstract extent split process. · 555936bf
      Tao Ma 提交于
      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: NTao Ma <tao.ma@oracle.com>
      555936bf
    • T
      ocfs2: Wrap ocfs2_extent_contig in ocfs2_extent_tree. · 853a3a14
      Tao Ma 提交于
      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: NTao Ma <tao.ma@oracle.com>
      853a3a14
    • T
      ocfs2: Basic tree root operation. · 8bf396de
      Tao Ma 提交于
      Add basic refcount tree root operation.
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      8bf396de
    • T
      ocfs2: Add refcount tree lock mechanism. · 374a263e
      Tao Ma 提交于
      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: NTao Ma <tao.ma@oracle.com>
      374a263e
    • T
      ocfs2: Add caching info for refcount tree. · c732eb16
      Tao Ma 提交于
      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: NTao Ma <tao.ma@oracle.com>
      c732eb16
    • T
      ocfs2: Add new refcount tree lock resource in dlmglue. · 8dec98ed
      Tao Ma 提交于
      refcount tree lock resource is used to protect refcount
      tree read/write among multiple nodes.
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      8dec98ed
    • T
      ocfs2: Abstract caching info checkpoint. · a4338481
      Tao Ma 提交于
      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> 
      a4338481
    • T
      ocfs2: Add ocfs2_read_refcount_block. · f2c870e3
      Tao Ma 提交于
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      f2c870e3
    • T
      ocfs2: Add metaecc for ocfs2_refcount_block. · 93c97087
      Tao Ma 提交于
      Add metaecc and journal trigger for ocfs2_refcount_block.
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      93c97087
    • T
      ocfs2: Define refcount tree structure. · 721f69c4
      Tao Ma 提交于
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      721f69c4
  2. 05 9月, 2009 28 次提交