Linux-BTRFS Archive on
 help / color / Atom feed
From: Josef Bacik <>
To: Nikolay Borisov <>
Subject: Re: [PATCH] btrfs: Add assert to catch nested transaction commit
Date: Fri, 13 Sep 2019 09:11:26 -0700
Message-ID: <> (raw)
In-Reply-To: <>

On Thu, Sep 12, 2019 at 06:31:44PM +0300, Nikolay Borisov wrote:
> A recent patch to btrfs showed that there was at least 1 case where a
> nesed transaction was committed. Nested transaction in this case  means
> a code which has a transaction handle calls some function which in turn
> obtains a copy of the same transaction handle. In such cases the correct
> thing to do is for the lower callee to call btrfs_end_transaction which
> contains appropriate checks so as to not commit the transaction which
> will result in stale trans handler for the caller.
> To catch such cases add an assert in btrfs_commit_transaction ensuring
> btrfs_trans_handle::use_count is always 1.
> Signed-off-by: Nikolay Borisov <>

Reviewed-by: Josef Bacik <>



      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12 15:31 Nikolay Borisov
2019-09-13 16:11 ` Josef Bacik [this message]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-BTRFS Archive on

Archives are clonable:
	git clone --mirror linux-btrfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-btrfs linux-btrfs/ \
	public-inbox-index linux-btrfs

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox