From patchwork Thu Jan 31 07:58:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miao Xie X-Patchwork-Id: 2071401 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 966023FCDE for ; Thu, 31 Jan 2013 07:58:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754846Ab3AaH6N (ORCPT ); Thu, 31 Jan 2013 02:58:13 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:37680 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1754637Ab3AaH6L (ORCPT ); Thu, 31 Jan 2013 02:58:11 -0500 X-IronPort-AV: E=Sophos;i="4.84,574,1355068800"; d="scan'208";a="6670857" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 31 Jan 2013 15:55:59 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id r0V7w90A015880; Thu, 31 Jan 2013 15:58:09 +0800 Received: from [10.167.225.199] ([10.167.225.199]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013013115570103-193852 ; Thu, 31 Jan 2013 15:57:01 +0800 Message-ID: <510A243C.3010508@cn.fujitsu.com> Date: Thu, 31 Jan 2013 15:58:52 +0800 From: Miao Xie Reply-To: miaox@cn.fujitsu.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Eric Sandeen CC: Tsutomu Itoh , Linux Btrfs Subject: Re: [BUG] kernel BUG at fs/btrfs/async-thread.c:605! References: <5109E70D.3010005@jp.fujitsu.com> <510A0756.40206@redhat.com> In-Reply-To: <510A0756.40206@redhat.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/01/31 15:57:01, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/01/31 15:57:01, Serialize complete at 2013/01/31 15:57:01 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On wed, 30 Jan 2013 23:55:34 -0600, Eric Sandeen wrote: > if you move the fail_block_groups: target above the comment, does that fix it? > (although I don't know yet what started IO . . . ) > > like this: > > From: Eric Sandeen > > Make sure that we are always done with the btree_inode's mapping > before we shut down the worker threads in open_ctree() error > cases. I reviewed your patch again, and found it just fix the above problem, it still have similar problems which are not fixed. How about this one? --- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 0c31d07..d8fd711 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2728,13 +2728,13 @@ fail_cleaner: * kthreads */ filemap_write_and_wait(fs_info->btree_inode->i_mapping); - invalidate_inode_pages2(fs_info->btree_inode->i_mapping); fail_block_groups: btrfs_free_block_groups(fs_info); fail_tree_roots: free_root_pointers(fs_info, 1); + invalidate_inode_pages2(fs_info->btree_inode->i_mapping); fail_sb_buffer: btrfs_stop_workers(&fs_info->generic_worker); @@ -2755,7 +2755,6 @@ fail_alloc: fail_iput: btrfs_mapping_tree_free(&fs_info->mapping_tree); - invalidate_inode_pages2(fs_info->btree_inode->i_mapping); iput(fs_info->btree_inode); fail_bdi: bdi_destroy(&fs_info->bdi);