mbox series

[0/2] btrfs: fixes for buffered write qgroup rsv leaks

Message ID cover.1721775142.git.boris@bur.io (mailing list archive)
Headers show
Series btrfs: fixes for buffered write qgroup rsv leaks | expand

Message

Boris Burkov July 23, 2024, 10:55 p.m. UTC
generic/475 exposes qgroup rsv leaks under EIO errors. These are fixes
for two classes of buffered write errors we are still hitting:
1. dirty pages leaked during an aborted transaction
2. dirty pages getting un-dirtied and leaked by cow_file_range when it
   doesn't make an ordered extent for a range.

After these two fixes, I was able to run generic/475 with squota enabled
at mkfs 100 times in a row without an error, and a modified generic/475
that always sleeps for 0 seconds 500 times.

Boris Burkov (2):
  btrfs: implement launder_folio for clearing dirty page rsv
  btrfs: fix qgroup rsv leaks in cow_file_range

 fs/btrfs/inode.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

David Sterba July 30, 2024, 1:45 p.m. UTC | #1
On Tue, Jul 23, 2024 at 03:55:55PM -0700, Boris Burkov wrote:
> generic/475 exposes qgroup rsv leaks under EIO errors. These are fixes
> for two classes of buffered write errors we are still hitting:
> 1. dirty pages leaked during an aborted transaction
> 2. dirty pages getting un-dirtied and leaked by cow_file_range when it
>    doesn't make an ordered extent for a range.
> 
> After these two fixes, I was able to run generic/475 with squota enabled
> at mkfs 100 times in a row without an error, and a modified generic/475
> that always sleeps for 0 seconds 500 times.
> 
> Boris Burkov (2):
>   btrfs: implement launder_folio for clearing dirty page rsv
>   btrfs: fix qgroup rsv leaks in cow_file_range

Thanks for the fixes. Please don't use abbreviations in subjects for
things like reserve ot block group if possible (e.g. only to avoid
overly long lines). I've fixed it in for-next.