linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adam Borowski <kilobyte@angband.pl>
To: Chris Mason <clm@fb.com>,
	linux-btrfs@vger.kernel.org, Eric Biggers <ebiggers3@gmail.com>
Cc: Josef Bacik <jbacik@fb.com>, David Sterba <dsterba@suse.com>
Subject: [PATCH for 4.6] btrfs: disable a spurious WARN_ON in btrfs_destroy_inode.
Date: Wed, 11 May 2016 20:29:47 +0200	[thread overview]
Message-ID: <20160511182947.GB6423@angband.pl> (raw)
In-Reply-To: <20160511182514.GA6423@angband.pl>

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 <kilobyte@angband.pl>
---
 fs/btrfs/inode.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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);
 
 	/*
--
2.8.1

  reply	other threads:[~2016-05-11 18:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10 23:19 WARNING at fs/btrfs/inode.c:9261 btrfs_destroy_inode() Eric Biggers
2016-05-10 23:57 ` Chris Mason
2016-05-11 18:25   ` Adam Borowski
2016-05-11 18:29     ` Adam Borowski [this message]
2016-05-11 20:17       ` [PATCH for 4.6] btrfs: disable a spurious WARN_ON in btrfs_destroy_inode Josef Bacik
2016-05-14  0:56 ` WARNING at fs/btrfs/inode.c:9261 btrfs_destroy_inode() Chris Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160511182947.GB6423@angband.pl \
    --to=kilobyte@angband.pl \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=ebiggers3@gmail.com \
    --cc=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).