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=-7.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_PASS,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 E0F0BC04AA7 for ; Mon, 13 May 2019 13:54:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BABC3208CA for ; Mon, 13 May 2019 13:54:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729733AbfEMNys (ORCPT ); Mon, 13 May 2019 09:54:48 -0400 Received: from mx2.suse.de ([195.135.220.15]:53510 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729040AbfEMNys (ORCPT ); Mon, 13 May 2019 09:54:48 -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 9E32BAD64 for ; Mon, 13 May 2019 13:54:47 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id AEC77DA851; Mon, 13 May 2019 15:55:48 +0200 (CEST) Date: Mon, 13 May 2019 15:55:48 +0200 From: David Sterba To: Qu Wenruo Cc: linux-btrfs@vger.kernel.org Subject: Re: [PATCH 0/3] btrfs-progs: Handle error properly in btrfs_commit_transaction() Message-ID: <20190513135548.GA3138@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Qu Wenruo , linux-btrfs@vger.kernel.org References: <20190416071526.3576-1-wqu@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190416071526.3576-1-wqu@suse.com> 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, Apr 16, 2019 at 03:15:23PM +0800, Qu Wenruo wrote: > This patchset can be fetched from github: > https://github.com/adam900710/btrfs-progs/tree/commit_failure_cleanup > > This patchset will address the BUG_ON() triggered in fuzz-tests/003 and > fuzz-tests/009. > > For proper error handling in btrfs_commit_transaction(), we need a way > to clean up per-transaction data properly. > > Currently we only have delayed refs which are per-transaction, so > introduce a new function, btrfs_destroy_delayed_refs() to cleanup > delayed refs. > > Now btrfs_commit_transaction() can error out gracefully with proper > cleanup. > > Patch 1 and 2 are just some minor cleanups found when crafting the 3rd > patch. > > Qu Wenruo (3): > btrfs-progs: Remove the dead branch in btrfs_run_delayed_refs() > btrfs-progs: Refactor btrfs_finish_extent_commit() > btrfs-progs: Handle error properly in btrfs_commit_transaction() Added to devel, thanks.