Re: [PATCH 10/23] btrfs: use btrfs_start_delalloc_roots in shrink_delalloc

Nikolay Borisov
2020-02-03T12:03:47Z

On 1.02.20 г. 0:36 ч., Josef Bacik wrote:
> The original iteration of flushing had us flushing delalloc and then
> checking to see if we could make our reservation, thus we were very
> careful about how many pages we would flush at once.
>
> But now that everything is async and we satisfy tickets as the space
> becomes available we don't have to keep track of any of this, simply try
> and flush the number of dirty inodes we may have in order to reclaim
> space to make our reservation. This cleans up our delalloc flushing
> significantly.
>
> The async_pages stuff is dropped because btrfs_start_delalloc_roots()
> handles the case that we generate async extents for us, so we no longer
> require this extra logic.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>

This change really equates to calling ->writepages() for every delalloc
inode. The old code in btrfs_writeback_inodes_sb_nr was more or less
doing the same. So :

Reviewed-by: Nikolay Borisov <nborisov@suse.com>