• Chris Mason's avatar
    Btrfs: always pin metadata in discard mode · 444528b3
    Chris Mason authored
    We have an optimization in btrfs to allow blocks to be
    immediately freed if they were allocated in this transaction and never
    written.  Otherwise they are pinned and freed when the transaction
    commits.
    
    This isn't optimal for discard mode because immediately freeing
    them means immediately discarding them.  It is better to give the
    block to the pinning code and letting the (slow) discard happen later.
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    444528b3
extent-tree.c 198 KB