linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Jan Schmidt <list.btrfs@jan-o-sch.net>
Cc: stable@vger.kernel.org, linux-btrfs@vger.kernel.org,
	chris.mason@oracle.com
Subject: Re: [PATCH] Btrfs: fix regression in scrub path resolving
Date: Fri, 13 Apr 2012 08:25:59 -0700	[thread overview]
Message-ID: <20120413152559.GA30525@kroah.com> (raw)
In-Reply-To: <1334329095-26326-1-git-send-email-list.btrfs@jan-o-sch.net>

On Fri, Apr 13, 2012 at 04:58:15PM +0200, Jan Schmidt wrote:
> commit 7a3ae2f8c8c8432e65467b7fc84d5deab04061a0 upstream.
> 
> In commit 4692cf58 (Linux 3.3) we introduced new backref walking code for
> btrfs. This assumes we're searching live roots, which requires a transaction
> context. While scrubbing, however, we must not join a transaction because
> this could deadlock with the commit path:
> 
> Can be exploited by corrupting data in btrfs (e.g. btrfs-corrupt-block) and
> then starting a scrub job (btrfs scrub). This will find the corrupt block
> and resolve the file paths affected. If that happens while btrfs is about to
> commit its transaction, a deadlock occurs: The scrub process prevents the
> commit from completing, while the path resolving code joins a transaction
> which blocks until the current transaction completes.
> 
> Additionally, what scrub really wants to do is resolving a logical address
> in the commit root it's currently checking. This patch adds support for
> logical to path resolving on commit roots and makes scrub use that.
> 
> Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
> Signed-off-by: Chris Mason <chris.mason@oracle.com>
> ---
> 
> I know, it's quite big for a stable patch. Anyway, it fixes a 3.3 regression
> and should therefore be included in the next 3.3-stable release. Tested on
> top of Linux 3.3.1.

I'll include it if Chris gives his ack for it.

Chris?


  reply	other threads:[~2012-04-13 15:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13 14:58 [PATCH] Btrfs: fix regression in scrub path resolving Jan Schmidt
2012-04-13 15:25 ` Greg KH [this message]
2012-04-13 16:00   ` Chris Mason

Reply instructions:

You may reply publicly 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20120413152559.GA30525@kroah.com \
    --to=greg@kroah.com \
    --cc=chris.mason@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=list.btrfs@jan-o-sch.net \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).