From patchwork Fri Jul 18 13:36:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Mason X-Patchwork-Id: 4584621 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 94CDC9F26C for ; Fri, 18 Jul 2014 13:36:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B4EE620120 for ; Fri, 18 Jul 2014 13:36:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D979D200E6 for ; Fri, 18 Jul 2014 13:36:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422670AbaGRNgV (ORCPT ); Fri, 18 Jul 2014 09:36:21 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:56303 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030283AbaGRNgS (ORCPT ); Fri, 18 Jul 2014 09:36:18 -0400 Received: from pps.filterd (m0004060 [127.0.0.1]) by mx0b-00082601.pphosted.com (8.14.5/8.14.5) with SMTP id s6IDZmgo024128; Fri, 18 Jul 2014 06:36:10 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=message-id : date : from : mime-version : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=facebook; bh=x7nzugsM818pUH+YWIgL5yjEIp4yU7SD3D38oJ0F1yM=; b=RVemaJ3lQ2de8nxsUqGwLyFpqQGGBsnYOWHCn0mA6LcDvXnz9kLgRW1c2oQA6Ll4S5sU /lCosycbZkPq0CEo05AIiJYP99T44kg8JS6xXjJ2ESDZ/0r3RON0CWIAbZduLa+AAy10 ReMH3wZzUg41XCogDUAAOys+HCu+RkD6/9U= Received: from mail.thefacebook.com (mailwest.thefacebook.com [173.252.71.148]) by mx0b-00082601.pphosted.com with ESMTP id 1n6pwb27rt-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=OK); Fri, 18 Jul 2014 06:36:10 -0700 Received: from [172.23.2.80] (192.168.57.29) by mail.thefacebook.com (192.168.16.21) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 18 Jul 2014 06:36:08 -0700 Message-ID: <53C922C6.1020406@fb.com> Date: Fri, 18 Jul 2014 09:36:06 -0400 From: Chris Mason User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Martin Steigerwald CC: Subject: Re: BTRFS hang with 3.16-rc5 References: <1502954.OtX3SzjMKZ@merkaba> <29286605.flGgbBIpOj@merkaba> <53C52AE4.6010803@fb.com> <25104768.pskoHShbKc@merkaba> In-Reply-To: <25104768.pskoHShbKc@merkaba> X-Enigmail-Version: 1.6 X-Originating-IP: [192.168.57.29] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.12.52, 1.0.14, 0.0.0000 definitions=2014-07-18_03:2014-07-18, 2014-07-18, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 kscore.is_bulkscore=4.83424411612532e-12 kscore.compositescore=0 circleOfTrustscore=0 compositescore=0.997600857122248 urlsuspect_oldscore=0.997600857122248 suspectscore=0 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=64355 rbsscore=0.997600857122248 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1407180159 X-FB-Internal: deliver Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 07/18/2014 03:51 AM, Martin Steigerwald wrote: > Am Dienstag, 15. Juli 2014, 09:21:40 schrieb Chris Mason: >> On 07/14/2014 05:58 PM, Martin Steigerwald wrote: >>> Am Montag, 14. Juli 2014, 16:12:22 schrieb Chris Mason: >>>> On 07/14/2014 11:10 AM, Martin Steigerwald wrote: >>>>> Am Montag, 14. Juli 2014, 17:04:22 schrieben Sie: >>>>>> Hi! >>>>>> >>>>>> While with 3.16-rc3 and rc4 I didn´t have a BTRFS hang in several days >>>>>> of >>>>>> usage, with 3-16-rc5 I had a hang again. Less than a hour since booting >>>>>> it. >>>>>> >>>>>> Since the hang bug I and others had with 3.15 and upto 3.16-rc2 usually >>>>>> didn´t happen that quickly after boot and since backtrace looks a bit >>>>>> different from what I have in memory, I post this in a new thread. >>>>>> See thread "Blocked tasks on 3.15.1" for a discussion of previous hang >>>>>> issues. >>>>> >>>>> Probably good to add some basic information on the filesystem: >>>> Do you have compression enabled? I wasn't able to nail down the 3.15.1 >>>> hang before vacation attacked me, but I'm hoping to track it down today. >>> >>> Yes. I have. >>> >>> It just hung again while I was playing PlaneShift. >>> >>> Back to 3.16-rc4 as rc5 seems to be broke here. >> >> The btrfs hang you're hitting goes back to 3.15. So 3.16-rc4 vs rc5 >> shouldn't be a factor. Are you hitting other problems with 3.16? > > On this system it is a matter. > > 3.16-rc5: Two hangs in one day > > 3.16-rc4: No hang so far with three days uptime (well with hibernation cycles > in between) > > So easy observation for me: 3.16-rc4 fine, 3.16-rc5 broke. Can you please try this patch on rc5 and look for the printk: --- 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/inode.c b/fs/btrfs/inode.c index 3668048..8ab56df 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8157,6 +8157,13 @@ void btrfs_destroy_inode(struct inode *inode) spin_unlock(&root->fs_info->ordered_root_lock); } + spin_lock(&root->fs_info->ordered_root_lock); + if (!list_empty(&BTRFS_I(inode)->ordered_operations)) { + list_del_init(&BTRFS_I(inode)->ordered_operations); +printk(KERN_CRIT "racing inode deletion with ordered operations!!!!!!!!!!!\n"); + } + spin_unlock(&root->fs_info->ordered_root_lock); + if (test_bit(BTRFS_INODE_HAS_ORPHAN_ITEM, &BTRFS_I(inode)->runtime_flags)) { btrfs_info(root->fs_info, "inode %llu still on the orphan list",