mbox series

[00/26] btrfs: avoid repeated path computations and allocations for send

Message ID cover.1739965104.git.fdmanana@suse.com (mailing list archive)
Headers show
Series btrfs: avoid repeated path computations and allocations for send | expand

Message

Filipe Manana Feb. 19, 2025, 11:43 a.m. UTC
From: Filipe Manana <fdmanana@suse.com>

This eleminates repeated path allocations and computations for send when
processing the current inode. The bulk of this is done in patches 24/26
and 25/26, while the remainder are cleanups and simplifications, some of
them to simplify the actual work related to avoiding the repeated path
allocations and computations.

A test, and its result, is described in the change log of patch 25/26.

Filipe Manana (26):
  btrfs: send: remove duplicated logic from fs_path_reset()
  btrfs: send: make fs_path_len() inline and constify its argument
  btrfs: send: always use fs_path_len() to determine a path's length
  btrfs: send: simplify return logic from fs_path_prepare_for_add()
  btrfs: send: simplify return logic from fs_path_add()
  btrfs: send: implement fs_path_add_path() using fs_path_add()
  btrfs: send: simplify return logic from fs_path_add_from_extent_buffer()
  btrfs: send: return -ENAMETOOLONG when attempting a path that is too long
  btrfs: send: simplify return logic from __get_cur_name_and_parent()
  btrfs: send: simplify return logic from is_inode_existent()
  btrfs: send: simplify return logic from get_cur_inode_state()
  btrfs: send: factor out common logic when sending xattrs
  btrfs: send: only use booleans variables at process_recorded_refs()
  btrfs: send: add and use helper to rename current inode when processing refs
  btrfs: send: simplify return logic from send_remove_xattr()
  btrfs: send: simplify return logic from record_new_ref_if_needed()
  btrfs: send: simplify return logic from record_deleted_ref_if_needed()
  btrfs: send: simplify return logic from record_new_ref()
  btrfs: send: simplify return logic from record_deleted_ref()
  btrfs: send: simplify return logic from record_changed_ref()
  btrfs: send: remove unnecessary return variable from process_new_xattr()
  btrfs: send: simplify return logic from process_changed_xattr()
  btrfs: send: simplify return logic from send_verity()
  btrfs: send: keep the current inode's path cached
  btrfs: send: avoid path allocation for the current inode when issuing commands
  btrfs: send: simplify return logic from send_set_xattr()

 fs/btrfs/send.c | 485 +++++++++++++++++++++++-------------------------
 1 file changed, 232 insertions(+), 253 deletions(-)