From patchwork Tue Apr 16 10:21:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 10902593 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C011513B5 for ; Tue, 16 Apr 2019 10:21:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A654C287AF for ; Tue, 16 Apr 2019 10:21:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A5FB289AB; Tue, 16 Apr 2019 10:21:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4451A287AF for ; Tue, 16 Apr 2019 10:21:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729021AbfDPKVu (ORCPT ); Tue, 16 Apr 2019 06:21:50 -0400 Received: from mx2.suse.de ([195.135.220.15]:50668 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728625AbfDPKVu (ORCPT ); Tue, 16 Apr 2019 06:21:50 -0400 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 92198AFD4 for ; Tue, 16 Apr 2019 10:21:49 +0000 (UTC) From: Qu Wenruo To: linux-btrfs@vger.kernel.org Subject: [PATCH 0/2] btrfs-progs: Metadata preallocation enhancement Date: Tue, 16 Apr 2019 18:21:42 +0800 Message-Id: <20190416102144.12173-1-wqu@suse.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patchset will address the github issue #123 to make btrfs-convert less possible to report false ENOSPC. The first patch will try to avoid the nested chunk/extent tree modification in a more explicit way. The 2nd patch will address the ENOSPC problem, by adding CSUM tree to the metadata preallocate list. The 2nd patch is not as aggressive as 7a12d8470e5f ("btrfs-progs: Do metadata preallocation as long as we're not modifying extent tree"). Even we have the 1st patch I still prefer to make less modification to avoid possible bugs. Qu Wenruo (2): btrfs-progs: Avoid nested chunk allocation call btrfs-progs: Do metadata preallocation for fs trees and csum tree check/main.c | 2 +- extent-tree.c | 20 +++++++++++++++++++- transaction.c | 3 ++- transaction.h | 3 ++- 4 files changed, 24 insertions(+), 4 deletions(-)