From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755827AbcBPSej (ORCPT ); Tue, 16 Feb 2016 13:34:39 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:34688 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753850AbcBPSeg (ORCPT ); Tue, 16 Feb 2016 13:34:36 -0500 Subject: Re: [PATCH block/for-4.5-fixes] writeback: keep superblock pinned during cgroup writeback association switches To: Tejun Heo , Tahsin Erdogan References: <20160215210047.GN3965@htj.duckdns.org> <20160216182457.GO3741@mtj.duckdns.org> Cc: cgroups@vger.kernel.org, "Theodore Ts'o" , Nauman Rafique , linux-kernel@vger.kernel.org, Jan Kara From: Jens Axboe Message-ID: <56C36BB9.5000104@kernel.dk> Date: Tue, 16 Feb 2016 11:34:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160216182457.GO3741@mtj.duckdns.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/16/2016 11:24 AM, Tejun Heo wrote: > From 586afaa034bec88934bad4eb6ab38ba07031ec5a Mon Sep 17 00:00:00 2001 > From: Tejun Heo > Date: Tue, 16 Feb 2016 13:14:35 -0500 > > If cgroup writeback is in use, an inode is associated with a cgroup > for writeback. If the inode's main dirtier changes to another cgroup, > the association gets updated asynchronously. Nothing was pinning the > superblock while such switches are in progress and superblock could go > away while async switching is pending or in progress leading to > crashes like the following. > > kernel BUG at fs/jbd2/transaction.c:319! > invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC > CPU: 1 PID: 29158 Comm: kworker/1:10 Not tainted 4.5.0-rc3 #51 > Hardware name: Google Google, BIOS Google 01/01/2011 > Workqueue: events inode_switch_wbs_work_fn > task: ffff880213dbbd40 ti: ffff880209264000 task.ti: ffff880209264000 > RIP: 0010:[] [] start_this_handle+0x382/0x3e0 > RSP: 0018:ffff880209267c30 EFLAGS: 00010202 > ... > Call Trace: > [] jbd2__journal_start+0xf4/0x190 > [] __ext4_journal_start_sb+0x4e/0x70 > [] ext4_evict_inode+0x12c/0x3d0 > [] evict+0xbb/0x190 > [] iput+0x130/0x190 > [] inode_switch_wbs_work_fn+0x343/0x4c0 > [] process_one_work+0x129/0x300 > [] worker_thread+0x126/0x480 > [] kthread+0xc4/0xe0 > [] ret_from_fork+0x3f/0x70 > > Fix it by bumping s_active while cgroup association switching is in > flight. Added for 4.5. -- Jens Axboe