Btrfs: Add an alarm for long-running transactions.
PATCH 1/1 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 <[email protected]>
--- fs/btrfs/transaction.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
fs/btrfs/transaction.c +1 -0
@@ -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++; }
Signature · 1 line
1.6.1.3