From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB734C67839 for ; Tue, 11 Dec 2018 19:04:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 90A762084E for ; Tue, 11 Dec 2018 19:04:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 90A762084E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-btrfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726470AbeLKTEy (ORCPT ); Tue, 11 Dec 2018 14:04:54 -0500 Received: from mx2.suse.de ([195.135.220.15]:42530 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726331AbeLKTEy (ORCPT ); Tue, 11 Dec 2018 14:04:54 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7738DACD8; Tue, 11 Dec 2018 19:04:52 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id EE094DA835; Tue, 11 Dec 2018 20:04:30 +0100 (CET) Date: Tue, 11 Dec 2018 20:04:30 +0100 From: David Sterba To: Nikolay Borisov Cc: dsterba@suse.cz, Josef Bacik , linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 4/8] btrfs: add ALLOC_CHUNK_FORCE to the flushing code Message-ID: <20181211190430.GP23615@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Nikolay Borisov , Josef Bacik , linux-btrfs@vger.kernel.org, kernel-team@fb.com References: <20181203152459.21630-1-josef@toxicpanda.com> <20181203152459.21630-5-josef@toxicpanda.com> <83a7b193-0763-6f7a-611c-deaf0d6c380e@suse.com> <20181211164751.GN23615@twin.jikos.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Tue, Dec 11, 2018 at 06:51:34PM +0200, Nikolay Borisov wrote: > > > On 11.12.18 г. 18:47 ч., David Sterba wrote: > > On Tue, Dec 11, 2018 at 12:08:23PM +0200, Nikolay Borisov wrote: > >> > >> > >> On 3.12.18 г. 17:24 ч., Josef Bacik wrote: > >>> With my change to no longer take into account the global reserve for > >>> metadata allocation chunks we have this side-effect for mixed block > >>> group fs'es where we are no longer allocating enough chunks for the > >>> data/metadata requirements. To deal with this add a ALLOC_CHUNK_FORCE > >>> step to the flushing state machine. This will only get used if we've > >>> already made a full loop through the flushing machinery and tried > >>> committing the transaction. If we have then we can try and force a > >>> chunk allocation since we likely need it to make progress. This > >>> resolves the issues I was seeing with the mixed bg tests in xfstests > >>> with my previous patch. > >>> > >>> Reviewed-by: Nikolay Borisov > >>> Signed-off-by: Josef Bacik > >> > >> Imo this and the previous patch should be squashed into one. > > > > I don't see why, separate patches also look good to me. One changes the > > logic regarding global reserve and the other fixes behaviour regarding > > mixed block groups. > > As far as I understand this deficient behavior is a direct result of the > previous patch. In essnse previous patch fixes something and introduces > new problem which is subsequently fixed by this patch. The way I see it > if both patches are squashed the change log should be : > > "I do [explanation of the first change]. However this introduces > [explain bug from patch 2] so fix it by [explain fix from 2nd patch]" Ok, patches merged.