lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 25 Nov 2010 15:07:12 +1100
From:	Nick Piggin <npiggin@...nel.dk>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Nick Piggin <npiggin@...nel.dk>,
	Chris Mason <chris.mason@...cle.com>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	linux-ext4 <linux-ext4@...r.kernel.org>,
	linux-btrfs <linux-btrfs@...r.kernel.org>,
	Jan Kara <jack@...e.cz>, Eric Sandeen <sandeen@...hat.com>,
	Theodore Ts'o <tytso@....edu>
Subject: Re: [patch] fs: fix deadlocks in writeback_if_idle

On Wed, Nov 24, 2010 at 02:51:57PM -0800, Andrew Morton wrote:
> On Wed, 24 Nov 2010 12:03:43 +1100
> Nick Piggin <npiggin@...nel.dk> wrote:
> 
> > On Tue, Nov 23, 2010 at 01:58:24PM -0500, Chris Mason wrote:
> > > > > My original btrfs patch just exported the bdi_ funcs so that btrfs could
> > > > > do the above internally.  But Christoph objected, and I think he's
> > > > > right.  We should either give everyone a bdi or make sure the writeback
> > > > > func kicks only one filesystem.
> > > > 
> > > > Well it's just kicking the writeback thread, and it will writeback
> > > > from that particular sb.
> > > 
> > > Hmmm?  It will writeback for all the SBs on that bdi.  In the current
> > > form that ext4 uses, that gets pretty expensive if you have a bunch of
> > > large partitions and you're only running out of space on one of them.
> > 
> > Right. But if the bdi has writeback in progress (which would be most
> > of the time, on a busy filesystem), writeback_if_idle doesn't do
> > anything, and it is happy just for the background writeback to
> > eventually get around to writing out for us.
> 
> That doesn't work if you're running btfs (apparently short for
> "busticated filesystem") because the bdi-per-sb thing carefully hid the
> information which you're looking for.
> 
> 
> We still don't have a fix for this bug yet, it appears, btw.

My last patch is a fix. It makes the writeback slightly less directed at
the sb (but there were no guarantees of that anyway). But this could be
improved with subsequent patches. We actually don't need to refcount the
sb in the work item submission, so long as we only compare sb pointers
and DTRT in the writeback thread if they match. So it can easily be
fixed, but for now both users (ext4 and btrfs) won't care about that
detail.

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ