From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-f179.google.com ([209.85.217.179]:41137 "EHLO mail-lb0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932192AbaGSRiz (ORCPT ); Sat, 19 Jul 2014 13:38:55 -0400 Received: by mail-lb0-f179.google.com with SMTP id v6so3653414lbi.24 for ; Sat, 19 Jul 2014 10:38:53 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <53C7CD0F.7070603@fb.com> References: <52e3cfababa49919100759860b59aa7c@admin.virtall.com> <4623589E-3298-4980-A257-665CFA9FB61B@colorremedies.com> <3081460.dX0cLeJPhK@quad> <53B1A862.50503@fb.com> <53B1ACAA.5040505@fb.com> <53B32275.6010200@fb.com> <53B40FEC.4030902@fb.com> <53B4140C.8060406@fb.com> <53C7CD0F.7070603@fb.com> Date: Sat, 19 Jul 2014 12:38:53 -0500 Message-ID: Subject: Re: Blocked tasks on 3.15.1 From: Cody P Schafer To: Chris Mason Cc: Chris Samuel , linux-btrfs@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-btrfs-owner@vger.kernel.org List-ID: On Thu, Jul 17, 2014 at 8:18 AM, Chris Mason wrote: > > [ deadlocks during rsync in 3.15 with compression enabled ] > > Hi everyone, > > I still haven't been able to reproduce this one here, but I'm going > through a series of tests with lzo compression foraced and every > operation forced to ordered. Hopefully it'll kick it out soon. > > While I'm hammering away, could you please try this patch. If this is > the buy you're hitting, the deadlock will go away and you'll see this > printk in the log. > > thanks! > > -chris > > 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", Thanks Chris. Running 3.15.6 with this patch applied on top: - still causes a hang with `rsync -hPaHAXx --del /mnt/home/nyx/ /home/nyx/` - no extra error messages printed (`dmesg | grep racing`) compared to without the patch To recap some details (so I can have it all in one place): - /home/ is btrfs with compress=lzo - /mnt/home is btrfs with no compression enabled. - I have _not_ created any nodatacow files. - Both filesystems are on different physical disks. - Full stack is: sata <-> dmcrypt <-> lvm <-> btrfs (I noticed others mentioning the use of dmcrypt)