[Tux3] To Do for atomic commit

Daniel Phillips phillips at phunq.net
Tue Jan 20 19:33:58 PST 2009


It is time to implement a basic atomic commit so we can move towards
starting review.  We are using a simplified strategy that stays as
close as we can to what we already have working pretty well.

The simplifications we will take for now:

  * Just one delta in the pipeline at a time.  We wait synchronously
    (in change_end) for each delta to complete.
      - therefore fork_buffer is synchronous, so SMP debugging
        can be done later.
      - no forking for volume blocks, only redirect

  * Synchronous wait on data writeout (filemap_fdatawait).
      - this essentially gives us ordered data mode to start with.

  * Simplistic delta transition policy (count to 1,000 then do a
    transition)

Here are the tasks to implement this strategy.  Some tasks marked "+" 
are already mostly done.

  Primitives to develop:
     + block fork for userspace
     + block fork for kernel
     + cursor_redirect
     - deferred free list

  Log entries:
     + alloc log blocks
     + append log record
     - log inode update
     - log itree promises
     - log dleaf promises
     - log alloc/free

  Log replay:
     - load log blocks
     - replay inode update
     - replay itree promises
     - replay dleaf promises
     - replay alloc/free

  Log rollup:
     - submit and retire all redirected volume blocks
     - submit forked bitmap blocks
     - free retired log blocks

  redirect:
     - Only used in rollup (retire blocks to shorten log)
     - Handled by cursor_redirect
     - Need to handle buffer data address change in some cases
     - redirect before change instead of mark_buffer_dirty after change
        - remove_index
        - tree_chop
        - insert_leaf
        - btree_leaf_split
        - store_attrs
        - purge_inum

  blockdirty (fork):
     - Only for logical files
     - blockdirty before change instead of mark_buffer_dirty after
       change
        + map_region
        - dir.c
        - xattr.c

 + Change brackets
     + chang_begin
     + change_end

 - Deferred free
     - Record deferred frees
     - Enter deferred free into alloc map

 + delta transition
     - submit volume blocks
     - sync dirty inodes
     - wait delta complete
     - wait on file writeback
     - wait on volume blocks
     - update and wait on super (just for now)
     - enter deferred frees to allocation map

 - need_delta policy
     - Do something smarter than a simple counter

_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3



More information about the Tux3 mailing list