* [PATCH] btrfs: add tracing for failed reservations
@ 2013-10-16 20:27 Jeff Mahoney
0 siblings, 0 replies; only message in thread
From: Jeff Mahoney @ 2013-10-16 20:27 UTC (permalink / raw)
To: linux-btrfs
When debugging ENOSPC issues, it's nice to be able to see which
reservations failed as well as the ones which succeeded.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
fs/btrfs/extent-tree.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/fs/btrfs/extent-tree.c 2013-10-13 18:41:28.000000000 -0400
+++ b/fs/btrfs/extent-tree.c 2013-10-16 16:23:27.986639216 -0400
@@ -3681,6 +3681,9 @@ commit_trans:
goto again;
}
+ trace_btrfs_space_reservation(root->fs_info,
+ "space_info:enospc",
+ data_sinfo->flags, bytes, 1);
return -ENOSPC;
}
data_sinfo->bytes_may_use += bytes;
@@ -4332,6 +4335,10 @@ out:
!block_rsv_use_bytes(global_rsv, orig_bytes))
ret = 0;
}
+ if (ret == -ENOSPC)
+ trace_btrfs_space_reservation(root->fs_info,
+ "space_info:enospc",
+ space_info->flags, orig_bytes, 1);
if (flushing) {
spin_lock(&space_info->lock);
space_info->flush = 0;
--
Jeff Mahoney
SUSE Labs
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-10-16 20:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-16 20:27 [PATCH] btrfs: add tracing for failed reservations Jeff Mahoney
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.