aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/geom_disk.c
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2016-10-31 23:09:52 +0000
committerConrad Meyer <cem@FreeBSD.org>2016-10-31 23:09:52 +0000
commit8532d381a91f1e201ab95ab7f913b723e8912571 (patch)
tree38a4d4d75a173395017b59aa5d986d25e29e841a /sys/geom/geom_disk.c
parent2d5386cc2c570cf781c45cc948a800c8f8d4f0d0 (diff)
downloadsrc-8532d381a91f1e201ab95ab7f913b723e8912571.tar.gz
src-8532d381a91f1e201ab95ab7f913b723e8912571.zip
Add BUF_TRACKING and FULL_BUF_TRACKING buffer debugging
Upstream the BUF_TRACKING and FULL_BUF_TRACKING buffer debugging code. This can be handy in tracking down what code touched hung bios and bufs last. The full history is especially useful, but adds enough bloat that it shouldn't be enabled in release builds. Function names (or arbitrary string constants) are tracked in a fixed-size ring in bufs. Bios gain a pointer to the upper buf for tracking. SCSI CCBs gain a pointer to the upper bio for tracking. Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8366
Notes
Notes: svn path=/head/; revision=308155
Diffstat (limited to 'sys/geom/geom_disk.c')
-rw-r--r--sys/geom/geom_disk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c
index 8c3ec6452cb3..dbaa6b524db3 100644
--- a/sys/geom/geom_disk.c
+++ b/sys/geom/geom_disk.c
@@ -421,6 +421,8 @@ g_disk_start(struct bio *bp)
int error;
off_t off;
+ biotrack(bp, __func__);
+
sc = bp->bio_to->private;
if (sc == NULL || (dp = sc->dp) == NULL || dp->d_destroyed) {
g_io_deliver(bp, ENXIO);