• Filipe Manana's avatar
    btrfs: send: bump the extent reference count limit for backref walking · e2a04165
    Filipe Manana authored
    After the previous patchset which is comprised of the following patches:
    
      01/17 btrfs: fix inode list leak during backref walking at resolve_indirect_refs()
      02/17 btrfs: fix inode list leak during backref walking at find_parent_nodes()
      03/17 btrfs: fix ulist leaks in error paths of qgroup self tests
      04/17 btrfs: remove pointless and double ulist frees in error paths of qgroup tests
      05/17 btrfs: send: avoid unnecessary path allocations when finding extent clone
      06/17 btrfs: send: update comment at find_extent_clone()
      07/17 btrfs: send: drop unnecessary backref context field initializations
      08/17 btrfs: send: avoid unnecessary backref lookups when finding clone source
      09/17 btrfs: send: optimize clone detection to increase extent sharing
      10/17 btrfs: use a single argument for extent offset in backref walking functions
      11/17 btrfs: use a structure to pass arguments to backref walking functions
      12/17 btrfs: reuse roots ulist on each leaf iteration for iterate_extent_inodes()
      13/17 btrfs: constify ulist parameter of ulist_next()
      14/17 btrfs: send: cache leaf to roots mapping during backref walking
      15/17 btrfs: send: skip unnecessary backref iterations
      16/17 btrfs: send: avoid double extent tree search when finding clone source
      17/17 btrfs: send: skip resolution of our own backref when finding clone source
    
    we have now much better performance when doing backref walking in the send
    code, so we can increase the current limit from 64 to 1024 references.
    This limit is still a bit conservative because there are still edge cases
    where backref walking will be too slow and spend a lot of cpu time, some IO
    reading b+tree nodes/leaves and memory. The goal is to eventually get rid
    of any limit, but for now bump it as it benefits users with extents shared
    more than 64 times and up to 1024 times, allowing for more deduplication
    at the destination without having to run a dedupe tool after a receive.
    Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    e2a04165
send.c 213 KB