On Sat, Sep 15, 2018 at 05:03:28AM +0800, Liu Bo wrote:
> When we delete an inode,
>
> btrfs_evict_inode() {
> truncate_inode_pages_final()
> truncate_inode_pages_range()
> lock_page()
> truncate_cleanup_page()
> btrfs_invalidatepage()
> wait_on_page_writeback
> btrfs_lookup_ordered_range()
> cancel_dirty_page()
> unlock_page()
> ...
> btrfs_wait_ordered_range()
> ...
>
> As VFS has called ->invalidatepage() to get all ordered extents done
> (if there is any) and truncated all page cache pages (no dirty pages
> to writeback after this step), wait_ordered_range() is just a noop.
>
> Reviewed-by: David Sterba <dsterba@xxxxxxxx>
> Signed-off-by: Liu Bo <bo.liu@xxxxxxxxxxxxxxxxx>
> ---
> v2: More details in the description.
Thanks, patch updated.