summaryrefslogtreecommitdiff
path: root/sys/kern/kern_physio.c
diff options
context:
space:
mode:
authorMerlin Scholz <merlin@scholz.ruhr>2023-08-19 19:16:22 +0200
committerMerlin Scholz <merlin@scholz.ruhr>2023-08-19 19:16:22 +0200
commite7b3826cda40b7e543318c19b9093dcceb8b4237 (patch)
treebf61ebee0cfbd1f3e2f4f62e00ef7ff655f1aa5d /sys/kern/kern_physio.c
parent365daf5cefc0591283d5625e2e15b7e532568c33 (diff)
Add logging for buf->b_cflags BC_BUSY changeslockdoc-10.99.5-vfs-0.3
Diffstat (limited to 'sys/kern/kern_physio.c')
-rw-r--r--sys/kern/kern_physio.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c
index 9547e5ddea1..690e80d9fad 100644
--- a/sys/kern/kern_physio.c
+++ b/sys/kern/kern_physio.c
@@ -284,6 +284,9 @@ physio(void (*strategy)(struct buf *), struct buf *obp, dev_t dev, int flags,
} else {
bp = getiobuf(NULL, true);
bp->b_cflags |= BC_BUSY;
+#ifdef LOCKDOC_VFS
+ lockdoc_log_lock(P_WRITE, &(bp->b_cflags), __FILE__, __LINE__, __func__, "b_cflags", 0);
+#endif
}
bp->b_dev = dev;
bp->b_proc = p;
@@ -297,6 +300,9 @@ physio(void (*strategy)(struct buf *), struct buf *obp, dev_t dev, int flags,
*/
bp->b_oflags = 0;
bp->b_cflags |= BC_BUSY;
+#ifdef LOCKDOC_VFS
+ lockdoc_log_lock(P_WRITE, &(bp->b_cflags), __FILE__, __LINE__, __func__, "b_cflags", 0);
+#endif
bp->b_flags = flags | B_PHYS | B_RAW;
bp->b_iodone = physio_biodone;
@@ -430,6 +436,9 @@ done_locked:
*/
mutex_enter(&bufcache_lock);
obp->b_cflags &= ~(BC_BUSY | BC_WANTED);
+#ifdef LOCKDOC_VFS
+ lockdoc_log_lock(V_WRITE, &(obp->b_cflags), __FILE__, __LINE__, __func__, "b_cflags", 0);
+#endif
obp->b_flags &= ~(B_PHYS | B_RAW);
obp->b_iodone = NULL;
cv_broadcast(&obp->b_busy);