Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp968105ybv; Thu, 13 Feb 2020 13:03:24 -0800 (PST) X-Google-Smtp-Source: APXvYqyNb8M/J5swaqglVDySg7cMhoad/NKDl+l4aEk8so6opOoW6m/YP2pRr6pvVxiBwbhjdeHv X-Received: by 2002:a54:450f:: with SMTP id l15mr4468145oil.126.1581627804592; Thu, 13 Feb 2020 13:03:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581627804; cv=none; d=google.com; s=arc-20160816; b=o38Q9geu9yXOR5q1czMdR6AyO90d97yRE9RKSw7xbCyB01cW7v4+IBabuKI6gBOHH4 lvKm5J0h4KZWbcKuwjSBkEsDxZAPXPM/qJEntriViG7w6C0pUyWUZJD4XYz/i5Bhkr/n 7vLRE8wYZ9mwlH8CtZEnBsu7iPIQ64rqfUk+6/+wQbbVp/ya+N4lqdGxNcKnFz5mOGA+ uw2mIQQEPQn12Nm4QJsLrxi6ao6oRgOOTb0mvZY4Rt41ZVo2XboVqIFkUXoDDMVg5X+f SXSE6ZC3EBHMINP7GWZ549wL9D2j3xkWR0duw3NciiIk4t2jj5QmrEGjFCqttPiV+m5F cfJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date; bh=FEVUvVpG9Db9lZw9jn+JbxQMqC3aXdvl+QreaOOCPGY=; b=yhnYZu5CM3Efj6rDOw1s360Beam89/zaa9zSt8OuXT4iQCxuHP974Hybd7MFJqtkAJ PAYKJP1rEvuvf0HkvQ6iN3e2NJH+68yLZOUcNqsed/zLFg4M3KJLkr/IxVhkmq7h1eip t6tdFKJc2/6sHqdjtRAJuCHXlDmCXeA83L5OSIP/ruQHV3iZKhpV8nfr7MS/FyExZMvc doX3lGQFX2xJzbjTlgPluIIsMJ/roCvgmrD6xrg9BKcqHMEK0IunFiS9/GKNjdO4L96E qUc1Xh8GkvRnuHKDVZsq5ASWHz+IG+vUhtet0GrCVI+Ls9D+2QKbf2a2cNL41YqLO+fI XI2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5si1635938oii.32.2020.02.13.13.03.11; Thu, 13 Feb 2020 13:03:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727778AbgBMVB0 (ORCPT + 99 others); Thu, 13 Feb 2020 16:01:26 -0500 Received: from mx2.suse.de ([195.135.220.15]:42708 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726780AbgBMVBZ (ORCPT ); Thu, 13 Feb 2020 16:01:25 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 18BC8ADE4; Thu, 13 Feb 2020 21:01:24 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id CAE2BDA703; Thu, 13 Feb 2020 22:01:09 +0100 (CET) Date: Thu, 13 Feb 2020 22:01:09 +0100 From: David Sterba To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Filipe Manana , Josef Bacik , David Sterba , Sasha Levin Subject: Re: [PATCH 4.9 089/116] btrfs: flush write bio if we loop in extent_write_cache_pages Message-ID: <20200213210109.GS2902@suse.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Filipe Manana , Josef Bacik , David Sterba , Sasha Levin References: <20200213151842.259660170@linuxfoundation.org> <20200213151917.511897953@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200213151917.511897953@linuxfoundation.org> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 13, 2020 at 07:20:33AM -0800, Greg Kroah-Hartman wrote: > From: Josef Bacik > > [ 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.