[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20101118122238.b2fc379a.akpm@linux-foundation.org>
Date: Thu, 18 Nov 2010 12:22:38 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Chris Mason <chris.mason@...cle.com>
Cc: Eric Sandeen <sandeen@...hat.com>, Nick Piggin <npiggin@...nel.dk>,
"Ted Ts'o" <tytso@....edu>, Jan Kara <jack@...e.cz>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-ext4 <linux-ext4@...r.kernel.org>,
linux-btrfs <linux-btrfs@...r.kernel.org>
Subject: Re: [patch] fix up lock order reversal in writeback
On Thu, 18 Nov 2010 13:51:15 -0500
Chris Mason <chris.mason@...cle.com> wrote:
> > If those functions "fix" a testcase then it was by sheer luck, and the
> > fs's ENOSPC handling is still busted.
> >
> > For a start writeback_inodes_sb_if_idle() is a no-op if the device
> > isn't idle! Secondly, if the device _was_ idle,
> > writeback_inodes_sb_if_idle() uses a work handoff to another thread,
> > which means that the work might not get executed for another six weeks.
> >
> > So no, your ENOSPC handling is still busted and I'll be doing you a
> > favour when I send that parport patch.
>
> Btrfs uses it with this cool looping construct. It's an innovative
> combination of while, 1, schedule_timeout(), and if all goes well, break.
If the calling code can do that then it doesn't need to pass the work
off to another thread at all. Just sychronously call
writeback_inodes_sb(), then bye-bye goes writeback_inodes_sb_if_idle(),
to great sighs of relief.
And again: as btrfs is effectively making a synchronous call to
writeback_inodes_sb() via schedule(), then surely it does not need to
take s_umount to protect its own darn superblock!!
--
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