Chris Ball
2009-Mar-10 16:54 UTC
[PATCH] Btrfs: Add an alarm for long-running transactions.
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
--
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