1. 23 9月, 2009 5 次提交
    • T
      ocfs2: Add support of decrementing refcount for delete. · 1823cb0b
      Tao Ma 提交于
          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: NTao Ma <tao.ma@oracle.com>
      1823cb0b
    • 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
  2. 05 9月, 2009 35 次提交