From: Chris Ball <cjb@laptop.org>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] Btrfs: Add an alarm for long-running transactions.
Date: Tue, 10 Mar 2009 12:54:50 -0400 [thread overview]
Message-ID: <m3d4cppbc5.fsf@pullcord.laptop.org> (raw)
If we're waiting for a transaction to end, and it started more than five
minutes ago, emit a warning.
Signed-off-by: Chris Ball <cjb@laptop.org>
---
fs/btrfs/transaction.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index f94c2ad..9fa477c 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -80,6 +80,7 @@ static noinline int join_transaction(struct btrfs_root *root)
root->fs_info->running_transaction = cur_trans;
spin_unlock(&root->fs_info->new_trans_lock);
} else {
+ WARN_ON_ONCE(get_seconds() - cur_trans->start_time > 300);
cur_trans->num_writers++;
cur_trans->num_joined++;
}
--
1.6.1.3
reply other threads:[~2009-03-10 16:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=m3d4cppbc5.fsf@pullcord.laptop.org \
--to=cjb@laptop.org \
--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