• Qu Wenruo's avatar
    btrfs: transaction: describe transaction states and transitions · 61c047b5
    Qu Wenruo authored
    Add an overview of the basic btrfs transaction transitions, including
    the following states:
    
    - No transaction states
    - Transaction N [[TRANS_STATE_RUNNING]]
    - Transaction N [[TRANS_STATE_COMMIT_START]]
    - Transaction N [[TRANS_STATE_COMMIT_DOING]]
    - Transaction N [[TRANS_STATE_UNBLOCKED]]
    - Transaction N [[TRANS_STATE_COMPLETED]]
    
    For each state, the comment will include:
    
    - Basic explaination about current state
    - How to go next stage
    - What will happen if we call various start_transaction() functions
    - Relationship to transaction N+1
    
    This doesn't provide tech details, but serves as a cheat sheet for
    reader to get into the code a little easier.
    Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    61c047b5
transaction.c 69 KB