• Josef Bacik's avatar
    btrfs: rework async transaction committing · fdfbf020
    Josef Bacik authored
    Currently we do this awful thing where we get another ref on a trans
    handle, async off that handle and commit the transaction from that work.
    Because we do this we have to mess with current->journal_info and the
    freeze counting stuff.
    
    We already have an async thing to kick for the transaction commit, the
    transaction kthread.  Replace this work struct with a flag on the
    fs_info to tell the kthread to go ahead and commit even if it's before
    our timeout.  Then we can drastically simplify the async transaction
    commit path.
    
    Note: this can be simplified and functionality based on the pending
    operation COMMIT.
    Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
    [ add note ]
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    fdfbf020
ctree.h 132 KB