mbox series

[v2,0/8] btrfs: some fixes and cleanups around btrfs_cow_block()

Message ID cover.1695812791.git.fdmanana@suse.com (mailing list archive)
Headers show
Series btrfs: some fixes and cleanups around btrfs_cow_block() | expand

Message

Filipe Manana Sept. 27, 2023, 11:09 a.m. UTC
From: Filipe Manana <fdmanana@suse.com>

This adds some missing error handling for highly unexpected but critical
conditions when COWing a tree block, some cleanups and moving some defrag
specific code out of ctree.c into defrag.c. More details on the changelogs.

V2: Fix compilation error on big endian systems (patch 7/8).
    Use transaction abort in patches 1/8 and 3/8.

Filipe Manana (8):
  btrfs: error out when COWing block using a stale transaction
  btrfs: error when COWing block from a root that is being deleted
  btrfs: error out when reallocating block for defrag using a stale transaction
  btrfs: remove noinline attribute from btrfs_cow_block()
  btrfs: use round_down() to align block offset at btrfs_cow_block()
  btrfs: rename and export __btrfs_cow_block()
  btrfs: export comp_keys() from ctree.c as btrfs_comp_keys()
  btrfs: move btrfs_realloc_node() from ctree.c into defrag.c

 fs/btrfs/ctree.c  | 198 ++++++++++------------------------------------
 fs/btrfs/ctree.h  |  42 +++++++++-
 fs/btrfs/defrag.c | 106 +++++++++++++++++++++++++
 3 files changed, 185 insertions(+), 161 deletions(-)

Comments

David Sterba Sept. 29, 2023, 2:33 p.m. UTC | #1
On Wed, Sep 27, 2023 at 12:09:20PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> This adds some missing error handling for highly unexpected but critical
> conditions when COWing a tree block, some cleanups and moving some defrag
> specific code out of ctree.c into defrag.c. More details on the changelogs.
> 
> V2: Fix compilation error on big endian systems (patch 7/8).
>     Use transaction abort in patches 1/8 and 3/8.
> 
> Filipe Manana (8):
>   btrfs: error out when COWing block using a stale transaction
>   btrfs: error when COWing block from a root that is being deleted
>   btrfs: error out when reallocating block for defrag using a stale transaction
>   btrfs: remove noinline attribute from btrfs_cow_block()
>   btrfs: use round_down() to align block offset at btrfs_cow_block()
>   btrfs: rename and export __btrfs_cow_block()
>   btrfs: export comp_keys() from ctree.c as btrfs_comp_keys()
>   btrfs: move btrfs_realloc_node() from ctree.c into defrag.c

Added to misc-next, thanks.