Skip to content

btrfs: fixes for send with relocation and reclaim

[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 Latest2 patches 2 repliesIn review
  2. v12 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: ensure relocation never runs while we have send operations runningfs/btrfs/block-group.c fs/btrfs/ctree.h fs/btrfs/disk-io.c +3 more+32 -191 reply
2/2btrfs: send: fix crash when memory allocations trigger reclaimfs/btrfs/disk-io.c fs/btrfs/qgroup.c fs/btrfs/send.c +2 more+2 -311 reply

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/2] btrfs: fixes for send with relocation and reclaim

From: Filipe Manana <[email protected]>

There's a recent report from Chris Murphy on a crash caused by send triggering reclaim and inode eviction due to page/memory allocation, the second patch fixes that. The first one just prevents relocation from happening while there are send operations in progress, as currently only balance is prevented from running but other operations can trigger relocation too (device shrinking and automatic chunk relocation on zoned filesystems). Details are in the changelogs of the patches.

V2: Add missing hunk to patch 1 where fs_info->send_in_progress is

    decremented while holding fs_info->send_reloc_lock and no longer
    while holding fs_info->balance_mutex. No changes to patch 2
    except for the rebase.

Filipe Manana (2):
btrfs: ensure relocation never runs while we have send operations
running
btrfs: send: fix crash when memory allocations trigger reclaim

 fs/btrfs/block-group.c | 10 ++++++++--
 fs/btrfs/ctree.h       |  5 +++--
 fs/btrfs/disk-io.c     | 19 ++-----------------
 fs/btrfs/qgroup.c      |  8 +-------
 fs/btrfs/relocation.c  | 13 +++++++++++++
 fs/btrfs/send.c        | 16 +++++++---------
 fs/btrfs/transaction.c |  3 ---
 fs/btrfs/transaction.h |  2 --
 fs/btrfs/volumes.c     |  8 --------
 9 files changed, 34 insertions(+), 50 deletions(-)
Signature · 1 line
2.28.0