Skip to content

btrfs: fixes, cleanups and optimizations around fiemap

[email protected] linux-btrfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest19 patches 1 replyIn review
  2. v118 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19btrfs: fix processing of delayed data refs during backref walkingfs/btrfs/backref.c+24 -90 replies
2/19btrfs: fix processing of delayed tree block refs during backref walkingfs/btrfs/backref.c+7 -60 replies
3/19btrfs: ignore fiemap path cache if we have multiple leaves for a data extentfs/btrfs/backref.c fs/btrfs/backref.h+26 -00 replies
4/19btrfs: get the next extent map during fiemap/lseek more efficientlyfs/btrfs/extent_map.c fs/btrfs/extent_map.h fs/btrfs/file.c+59 -180 replies
5/19btrfs: skip unnecessary extent map searches during fiemap and lseekfs/btrfs/file.c+12 -00 replies
6/19btrfs: skip unnecessary delalloc search during fiemap and lseekfs/btrfs/file.c+20 -130 replies
7/19btrfs: drop pointless memset when cloning extent bufferfs/btrfs/extent_io.c+0 -10 replies
8/19btrfs: drop redundant bflags initialization when allocating extent bufferfs/btrfs/extent_io.c+0 -10 replies
9/19btrfs: remove checks for a root with id 0 during backref walkingfs/btrfs/backref.c+2 -40 replies
10/19btrfs: remove checks for a 0 inode number during backref walkingfs/btrfs/backref.c+2 -20 replies
11/19btrfs: directly pass the inode to btrfs_is_data_extent_shared()fs/btrfs/backref.c fs/btrfs/backref.h fs/btrfs/extent_io.c+12 -140 replies
12/19btrfs: turn the backref sharedness check cache into a context objectfs/btrfs/backref.c fs/btrfs/backref.h fs/btrfs/extent_io.c+32 -320 replies
13/19btrfs: move ulists to data extent sharedness check contextfs/btrfs/backref.c fs/btrfs/backref.h fs/btrfs/extent_io.c+48 -360 replies
14/19btrfs: remove roots ulist when checking data extent sharednessfs/btrfs/backref.c fs/btrfs/backref.h+1 -60 replies
15/19btrfs: remove useless logic when finding parent nodesfs/btrfs/backref.c+18 -50 replies
16/19btrfs: cache sharedness of the last few data extents during fiemapfs/btrfs/backref.c fs/btrfs/backref.h+74 -30 replies
17/19btrfs: move up backref sharedness cache store and lookup functionsfs/btrfs/backref.c+118 -1180 replies
18/19btrfs: avoid duplicated resolution of indirect backrefs during fiemapfs/btrfs/backref.c fs/btrfs/backref.h fs/btrfs/extent_io.c+69 -100 replies
19/19btrfs: avoid unnecessary resolution of indirect backrefs during fiemapfs/btrfs/backref.c+17 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/19] btrfs: fixes, cleanups and optimizations around fiemap

From: Filipe Manana <[email protected]>

The first 3 patches are bug fixes, the first two fixing bugs in backref walking that have been around since 2013 and 2017, respectively, while the third one fixes a bug introduced in this merge window.

The remaining are performance optimizations in the fiemap code path, as well as some cleanups and refactorings to support them. Results and tests are found in the changelogs of individual patches (06/19, 16/19, 18/19 and 19/19).

V2: Add one more patch to fix a long standing bug (since 2013) regarding
delayed data references during backref walking. Made it first patch in the series since later patches touched the surrounding code and it should backported to stable releases.

Filipe Manana (19):
btrfs: fix processing of delayed data refs during backref walking
btrfs: fix processing of delayed tree block refs during backref walking
btrfs: ignore fiemap path cache if we have multiple leaves for a data extent
btrfs: get the next extent map during fiemap/lseek more efficiently
btrfs: skip unnecessary extent map searches during fiemap and lseek
btrfs: skip unnecessary delalloc search during fiemap and lseek
btrfs: drop pointless memset when cloning extent buffer
btrfs: drop redundant bflags initialization when allocating extent buffer
btrfs: remove checks for a root with id 0 during backref walking
btrfs: remove checks for a 0 inode number during backref walking
btrfs: directly pass the inode to btrfs_is_data_extent_shared()
btrfs: turn the backref sharedness check cache into a context object
btrfs: move ulists to data extent sharedness check context
btrfs: remove roots ulist when checking data extent sharedness
btrfs: remove useless logic when finding parent nodes
btrfs: cache sharedness of the last few data extents during fiemap
btrfs: move up backref sharedness cache store and lookup functions
btrfs: avoid duplicated resolution of indirect backrefs during fiemap
btrfs: avoid unnecessary resolution of indirect backrefs during fiemap

 fs/btrfs/backref.c    | 489 ++++++++++++++++++++++++++++--------------
 fs/btrfs/backref.h    |  55 ++++-
 fs/btrfs/extent_io.c  |  68 +++---
 fs/btrfs/extent_map.c |  31 ++-
 fs/btrfs/extent_map.h |   2 +
 fs/btrfs/file.c       |  69 ++++--
 6 files changed, 483 insertions(+), 231 deletions(-)
Signature · 1 line
2.35.1