From patchwork Wed May 11 18:29:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Borowski X-Patchwork-Id: 9073841 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9BB65BF29F for ; Wed, 11 May 2016 18:29:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C7B5F2012D for ; Wed, 11 May 2016 18:29:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 932B22012B for ; Wed, 11 May 2016 18:29:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932121AbcEKS3y (ORCPT ); Wed, 11 May 2016 14:29:54 -0400 Received: from tartarus.angband.pl ([89.206.35.136]:60671 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751692AbcEKS3x (ORCPT ); Wed, 11 May 2016 14:29:53 -0400 Received: from kilobyte by tartarus.angband.pl with local (Exim 4.84_2) (envelope-from ) id 1b0YtH-0002OH-QQ; Wed, 11 May 2016 20:29:47 +0200 Date: Wed, 11 May 2016 20:29:47 +0200 From: Adam Borowski To: Chris Mason , linux-btrfs@vger.kernel.org, Eric Biggers Cc: Josef Bacik , David Sterba Subject: [PATCH for 4.6] btrfs: disable a spurious WARN_ON in btrfs_destroy_inode. Message-ID: <20160511182947.GB6423@angband.pl> References: <20160510235758.3ow2wdumtisauw4n@floor.thefacebook.com> <20160511182514.GA6423@angband.pl> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160511182514.GA6423@angband.pl> X-Junkbait: aaron@angband.pl, zzyx@angband.pl User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kilobyte@angband.pl X-SA-Exim-Scanned: No (on tartarus.angband.pl); SAEximRunCond expanded to false Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 This happens a lot on real-world loads. The issue is apparently benign, as unsaved pending checksums are moot when the ship^Winode is going down anyway. Thus, no need to cause panic in users. I've retained the warning in CONFIG_BTRFS_ASSERT builds, as this shouldn't happen. I've replaced the no longer helpful register+stack dump with a printk that mentions the device affected. Signed-off-by: Adam Borowski --- fs/btrfs/inode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.8.1 -- 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 2aaba58..ed78104 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -9258,7 +9258,10 @@ void btrfs_destroy_inode(struct inode *inode) WARN_ON(BTRFS_I(inode)->outstanding_extents); WARN_ON(BTRFS_I(inode)->reserved_extents); WARN_ON(BTRFS_I(inode)->delalloc_bytes); - WARN_ON(BTRFS_I(inode)->csum_bytes); +#ifdef CONFIG_BTRFS_ASSERT + if (BTRFS_I(inode)->csum_bytes) + btrfs_info(root->fs_info, "btrfs_destroy_inode: leftover csum_bytes"); +#endif WARN_ON(BTRFS_I(inode)->defrag_bytes); /*