[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161216084057.GE26608@quack2.suse.cz>
Date: Fri, 16 Dec 2016 09:40:57 +0100
From: Jan Kara <jack@...e.cz>
To: Michal Hocko <mhocko@...nel.org>
Cc: linux-mm@...ck.org, linux-fsdevel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Dave Chinner <david@...morbit.com>,
Theodore Ts'o <tytso@....edu>, Chris Mason <clm@...com>,
David Sterba <dsterba@...e.cz>, Jan Kara <jack@...e.cz>,
ceph-devel@...r.kernel.org, cluster-devel@...hat.com,
linux-nfs@...r.kernel.org, logfs@...fs.org,
linux-xfs@...r.kernel.org, linux-ext4@...r.kernel.org,
linux-btrfs@...r.kernel.org, linux-mtd@...ts.infradead.org,
reiserfs-devel@...r.kernel.org,
linux-ntfs-dev@...ts.sourceforge.net,
linux-f2fs-devel@...ts.sourceforge.net,
linux-afs@...ts.infradead.org, LKML <linux-kernel@...r.kernel.org>,
Michal Hocko <mhocko@...e.com>
Subject: Re: [PATCH 7/9] jbd2: make the whole kjournald2 kthread NOFS safe
On Thu 15-12-16 15:07:13, Michal Hocko wrote:
> From: Michal Hocko <mhocko@...e.com>
>
> kjournald2 is central to the transaction commit processing. As such any
> potential allocation from this kernel thread has to be GFP_NOFS. Make
> sure to mark the whole kernel thread GFP_NOFS by the memalloc_nofs_save.
>
> Suggested-by: Jan Kara <jack@...e.cz>
> Signed-off-by: Michal Hocko <mhocko@...e.com>
Looks good to me. You can add:
Reviewed-by: Jan Kara <jack@...e.cz>
Honza
> ---
> fs/jbd2/journal.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
> index 8ed971eeab44..6dad8c5d6ddf 100644
> --- a/fs/jbd2/journal.c
> +++ b/fs/jbd2/journal.c
> @@ -206,6 +206,13 @@ static int kjournald2(void *arg)
> wake_up(&journal->j_wait_done_commit);
>
> /*
> + * Make sure that no allocations from this kernel thread will ever recurse
> + * to the fs layer because we are responsible for the transaction commit
> + * and any fs involvement might get stuck waiting for the trasn. commit.
> + */
> + memalloc_nofs_save();
> +
> + /*
> * And now, wait forever for commit wakeup events.
> */
> write_lock(&journal->j_state_lock);
> --
> 2.10.2
>
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists