Re: [PATCH] ext4: deaccount delayed allocations at freeing inode in ext4_evict_inode()

From: Konstantin Khlebnikov
Date: Tue Oct 29 2019 - 03:21:03 EST


On 29/10/2019 10.17, Konstantin Khlebnikov wrote:
If inode->i_blocks is zero then ext4_evict_inode() skips ext4_truncate().
Delayed allocation extents are freed later in ext4_clear_inode() but this
happens when quota reference is already dropped. This leads to leak of
reserved space in quota block, which disappears after umount-mount.

This seems broken for a long time but worked somehow until recent changes
in delayed allocation.

FYI, perf cannot correctly parse related perf events without this:

157228145325.7530.4974461761228678289.stgit@buzz/">https://lore.kernel.org/lkml/157228145325.7530.4974461761228678289.stgit@buzz/