• Filipe Manana's avatar
    btrfs: avoid starting new transaction when flushing delayed items and refs · 2391245a
    Filipe Manana authored
    
    
    When flushing space we join a transaction to flush delayed items and
    delayed references, in order to try to release space. However using
    btrfs_join_transaction() not only joins an existing transaction as well
    as it starts a new transaction if there is none open. If there is no
    transaction open, we don't have neither delayed items nor delayed
    references, so creating a new transaction is a waste of time, IO and
    creates an unnecessary rotation of the backup roots without gaining any
    benefits (including releasing space).
    
    So use btrfs_join_transaction_nostart() when attempting to flush delayed
    items and references.
    Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    2391245a
space-info.c 58.7 KB