On Wed, Feb 16, 2022 at 03:09:08PM +0800, Qu Wenruo wrote: > No upstream commit. > Since the bug only exists between v5.11 and v5.15. In v5.16 btrfs > reworked defrag and no longer has this bug. I'm not sure this will work as a stable patch. A backport of an existing upstream patch that is only adapted to older stable code base is fine but what is the counterpart of this patch? > > [BUG] > Since commit 7f458a3873ae ("btrfs: fix race when defragmenting leads to > unnecessary IO") autodefrag no longer works with the following script: The bug does no seem to be significant, autodefrag is basically a heuristic so if it does not work perfectly in all cases it's still OK.