mbox series

[0/5] btrfs: qgroups rsv fixes

Message ID cover.1701464169.git.boris@bur.io (mailing list archive)
Headers show
Series btrfs: qgroups rsv fixes | expand

Message

Boris Burkov Dec. 1, 2023, 9 p.m. UTC
This series contains a number of related but relatively orthogonal fixes
for various bugs in qgroup/squota reservation accounting. Most of these
manifest as either rsv underflow WARNINGs (in qgroup_rsv_release) or as
WARNINGs at umount for unreleased space.

With these fixes, I am able to get a fully clean '-g auto' fstests run
on my setup and with -O squota in MKFS_OPTIONS.

Boris Burkov (5):
  btrfs: free qgroup rsv on ioerr ordered_extent
  btrfs: fix qgroup_free_reserved_data int overflow
  btrfs: free qgroup pertrans rsv on trans abort
  btrfs: dont clear qgroup rsv bit in release_folio
  btrfs: ensure releasing squota rsv on head refs

 fs/btrfs/delalloc-space.c |  2 +-
 fs/btrfs/disk-io.c        | 28 +++++++++++++++++++++++
 fs/btrfs/extent-tree.c    | 47 +++++++++++++++++++++++++++------------
 fs/btrfs/extent_io.c      |  3 ++-
 fs/btrfs/file.c           |  2 +-
 fs/btrfs/inode.c          | 16 ++++++-------
 fs/btrfs/ordered-data.c   | 10 +++++----
 fs/btrfs/qgroup.c         | 46 +++++++++++++++++++++++++-------------
 fs/btrfs/qgroup.h         |  8 +++----
 9 files changed, 114 insertions(+), 48 deletions(-)

Comments

David Sterba Dec. 5, 2023, 5:09 p.m. UTC | #1
On Fri, Dec 01, 2023 at 01:00:08PM -0800, Boris Burkov wrote:
> This series contains a number of related but relatively orthogonal fixes
> for various bugs in qgroup/squota reservation accounting. Most of these
> manifest as either rsv underflow WARNINGs (in qgroup_rsv_release) or as
> WARNINGs at umount for unreleased space.
> 
> With these fixes, I am able to get a fully clean '-g auto' fstests run
> on my setup and with -O squota in MKFS_OPTIONS.
> 
> Boris Burkov (5):
>   btrfs: free qgroup rsv on ioerr ordered_extent
>   btrfs: fix qgroup_free_reserved_data int overflow
>   btrfs: free qgroup pertrans rsv on trans abort
>   btrfs: dont clear qgroup rsv bit in release_folio
>   btrfs: ensure releasing squota rsv on head refs

I've added it to misc-next for testing, some of the patches seem to be
an rc pull material. There are some comments too.