From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755505Ab2CDWrE (ORCPT ); Sun, 4 Mar 2012 17:47:04 -0500 Received: from ogre.sisk.pl ([217.79.144.158]:54809 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753179Ab2CDWrB (ORCPT ); Sun, 4 Mar 2012 17:47:01 -0500 From: "Rafael J. Wysocki" To: linux-pm@lists.linux-foundation.org Subject: Re: [linux-pm] [Patch] JBD and JBD2 missing set_freezable() Date: Sun, 4 Mar 2012 23:51:07 +0100 User-Agent: KMail/1.13.6 (Linux/3.3.0-rc6+; KDE/4.6.0; x86_64; ; ) Cc: Nigel Cunningham , Jan Kara , linux-fsdevel@vger.kernel.org, LKML , linux-ext4@vger.kernel.org References: <4F2BA1FD.3030302@tuxonice.net> In-Reply-To: <4F2BA1FD.3030302@tuxonice.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203042351.07405.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, February 03, 2012, Nigel Cunningham wrote: > Hi all. > > With the latest and greatest changes to the freezer, I started seeing > panics that were caused by jbd2 running post-process freezing and > hitting the canary BUG_ON for non-TuxOnIce I/O submission. I've traced > this back to a lack of set_freezable calls in both jbd and jbd2. Since > they're clearly meant to be frozen (there are tests for freezing()), I > submit the following patch to add the missing calls. > > Signed-off-by: Nigel Cunningham Well, I wonder what the filesystems people think about that. Thanks, Rafael > diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c > index 59c09f9..89cd985 100644 > --- a/fs/jbd/journal.c > +++ b/fs/jbd/journal.c > @@ -129,6 +129,8 @@ static int kjournald(void *arg) > setup_timer(&journal->j_commit_timer, commit_timeout, > (unsigned long)current); > > + set_freezable(); > + > /* Record that the journal thread is running */ > journal->j_task = current; > wake_up(&journal->j_wait_done_commit); > diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c > index c0a5f9f..663e47c 100644 > --- a/fs/jbd2/journal.c > +++ b/fs/jbd2/journal.c > @@ -139,6 +139,8 @@ static int kjournald2(void *arg) > setup_timer(&journal->j_commit_timer, commit_timeout, > (unsigned long)current); > > + set_freezable(); > + > /* Record that the journal thread is running */ > journal->j_task = current; > wake_up(&journal->j_wait_done_commit); >