mbox series

[00/17] btrfs: some misc stuff around space flushing and enospc handling

Message ID cover.1690383587.git.fdmanana@suse.com (mailing list archive)
Headers show
Series btrfs: some misc stuff around space flushing and enospc handling | expand

Message

Filipe Manana July 26, 2023, 3:56 p.m. UTC
From: Filipe Manana <fdmanana@suse.com>

A few fixes, improvements, cleanups around space flushing, enospc handling,
debugging. These came out while debugging an image of a fs that fails to
mount due to being out of unallocated space and having only about 1.6M of
free metadata space, which is not enough to commit any transaction triggered
during mount while doing orphan cleanup, resulting in transactions aborts
either when running delayed refs or somewhere in the critical section of a
transaction commit. These patches do not prevent getting into that situation,
but that will be attempted by other patches in a separate patchset.

Filipe Manana (17):
  btrfs: don't start transaction when joining with TRANS_JOIN_NOSTART
  btrfs: update comment for btrfs_join_transaction_nostart()
  btrfs: print target number of bytes when dumping free space
  btrfs: print block group super and delalloc bytes when dumping space info
  btrfs: print available space for a block group when dumping a space info
  btrfs: print available space across all block groups when dumping space info
  btrfs: don't steal space from global rsv after a transaction abort
  btrfs: store the error that turned the fs into error state
  btrfs: return real error when orphan cleanup fails due to a transaction abort
  btrfs: fail priority metadata ticket with real fs error
  btrfs: make btrfs_cleanup_fs_roots() static
  btrfs: make find_free_dev_extent() static
  btrfs: merge find_free_dev_extent() and find_free_dev_extent_start()
  btrfs: avoid starting new transaction when flushing delayed items and refs
  btrfs: avoid starting and committing empty transaction when flushing space
  btrfs: avoid start and commit empty transaction when starting qgroup rescan
  btrfs: avoid start and commit empty transaction when flushing qgroups

 fs/btrfs/disk-io.c          | 102 ++++++++++++++++++------------------
 fs/btrfs/disk-io.h          |   1 -
 fs/btrfs/free-space-cache.c |   3 +-
 fs/btrfs/fs.h               |  12 +++--
 fs/btrfs/inode.c            |   9 +++-
 fs/btrfs/messages.c         |  10 ++--
 fs/btrfs/qgroup.c           |  19 ++++---
 fs/btrfs/space-info.c       |  51 ++++++++++++++----
 fs/btrfs/transaction.c      |  12 +++--
 fs/btrfs/volumes.c          |  21 +++-----
 fs/btrfs/volumes.h          |   2 -
 11 files changed, 144 insertions(+), 98 deletions(-)

Comments

David Sterba Aug. 17, 2023, 12:58 p.m. UTC | #1
On Wed, Jul 26, 2023 at 04:56:56PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> A few fixes, improvements, cleanups around space flushing, enospc handling,
> debugging. These came out while debugging an image of a fs that fails to
> mount due to being out of unallocated space and having only about 1.6M of
> free metadata space, which is not enough to commit any transaction triggered
> during mount while doing orphan cleanup, resulting in transactions aborts
> either when running delayed refs or somewhere in the critical section of a
> transaction commit. These patches do not prevent getting into that situation,
> but that will be attempted by other patches in a separate patchset.
> 
> Filipe Manana (17):
>   btrfs: don't start transaction when joining with TRANS_JOIN_NOSTART
>   btrfs: update comment for btrfs_join_transaction_nostart()
>   btrfs: print target number of bytes when dumping free space
>   btrfs: print block group super and delalloc bytes when dumping space info
>   btrfs: print available space for a block group when dumping a space info
>   btrfs: print available space across all block groups when dumping space info
>   btrfs: don't steal space from global rsv after a transaction abort
>   btrfs: store the error that turned the fs into error state
>   btrfs: return real error when orphan cleanup fails due to a transaction abort
>   btrfs: fail priority metadata ticket with real fs error
>   btrfs: make btrfs_cleanup_fs_roots() static
>   btrfs: make find_free_dev_extent() static
>   btrfs: merge find_free_dev_extent() and find_free_dev_extent_start()
>   btrfs: avoid starting new transaction when flushing delayed items and refs
>   btrfs: avoid starting and committing empty transaction when flushing space
>   btrfs: avoid start and commit empty transaction when starting qgroup rescan
>   btrfs: avoid start and commit empty transaction when flushing qgroups

Looks like I forgot to reply, the patchset has been in misc-next for
some time. Thanks.