lkml.org 
[lkml]   [2020]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4.9 089/116] btrfs: flush write bio if we loop in extent_write_cache_pages
On Thu, Feb 13, 2020 at 07:20:33AM -0800, Greg Kroah-Hartman wrote:
> From: Josef Bacik <josef@toxicpanda.com>
>
> [ Upstream commit 96bf313ecb33567af4cb53928b0c951254a02759 ]

This commit does not exist in my tree, the correct upstream commit of
the backported patch should be 42ffb0bf584ae5b6b38f72259af1e0ee417ac77f.

> --- a/fs/btrfs/extent_io.c
> +++ b/fs/btrfs/extent_io.c
> @@ -4060,6 +4060,14 @@ static int extent_write_cache_pages(struct extent_io_tree *tree,
> */
> scanned = 1;
> index = 0;
> +
> + /*
> + * If we're looping we could run into a page that is locked by a
> + * writer and that writer could be waiting on writeback for a
> + * page in our current bio, and thus deadlock, so flush the
> + * write bio here.
> + */
> + flush_write_bio(data);

This has been modified to apply, flush_write_bio does not return a value
in 4.9, perhaps this led to the different commit id.

\
 
 \ /
  Last update: 2020-02-13 22:02    [W:0.286 / U:8.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site