On Fri, Apr 13, 2012 at 08:25:59AM -0700, Greg KH wrote: > 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 <[email protected]> > > Signed-off-by: Chris Mason <[email protected]> > > --- > > > > 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?
Ack ;) -chris -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
