* [PATCH] Btrfs: Add an alarm for long-running transactions.
@ 2009-03-10 16:54 Chris Ball
0 siblings, 0 replies; only message in thread
From: Chris Ball @ 2009-03-10 16:54 UTC (permalink / raw)
To: linux-btrfs
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-10 16:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-10 16:54 [PATCH] Btrfs: Add an alarm for long-running transactions Chris Ball
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox