Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178169933
D62249.1796176493.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D62249.1796176493.diff
View Options
diff --git a/sys/kern/vfs_bio.c.strat b/sys/kern/vfs_bio.c
--- a/sys/kern/vfs_bio.c.strat
+++ b/sys/kern/vfs_bio.c
@@ -5181,8 +5181,9 @@
KASSERT(vp == bo->bo_private, ("Inconsistent vnode bufstrategy"));
KASSERT(!VN_ISDEV(vp),
("Wrong vnode in bufstrategy(bp=%p, vp=%p)", bp, vp));
- i = VOP_STRATEGY(vp, bp);
- KASSERT(i == 0, ("VOP_STRATEGY failed bp=%p vp=%p", bp, bp->b_vp));
+ i = VOP_STRATEGY_UNLOCKED(vp, bp);
+ KASSERT(i == 0, ("VOP_STRATEGY_UNLOCKED failed bp=%p vp=%p", bp,
+ bp->b_vp));
}
/*
diff --git a/sys/kern/vfs_default.c.strat b/sys/kern/vfs_default.c
--- a/sys/kern/vfs_default.c.strat
+++ b/sys/kern/vfs_default.c
@@ -82,6 +82,7 @@
static int vop_stdread_pgcache(struct vop_read_pgcache_args *ap);
static int vop_stdstat(struct vop_stat_args *ap);
static int vop_stdgetlowvnode(struct vop_getlowvnode_args *ap);
+static int vop_stdstrategy_unlocked(struct vop_strategy_unlocked_args *ap);
/*
* This vnode table stores what we want to do if the filesystem doesn't
@@ -134,6 +135,7 @@
.vop_rename = vop_norename,
.vop_revoke = VOP_PANIC,
.vop_strategy = vop_nostrategy,
+ .vop_strategy_unlocked = vop_stdstrategy_unlocked,
.vop_unlock = vop_stdunlock,
.vop_vptocnp = vop_stdvptocnp,
.vop_vptofh = vop_stdvptofh,
@@ -1661,3 +1663,12 @@
*ap->a_vplp = ap->a_vp;
return (0);
}
+
+/*
+ * By default, just use the locked vnode operation.
+ */
+static int
+vop_stdstrategy_unlocked(struct vop_strategy_unlocked_args *ap)
+{
+ return (VOP_STRATEGY(ap->a_vp, ap->a_bp));
+}
diff --git a/sys/kern/vnode_if.src.strat b/sys/kern/vnode_if.src
--- a/sys/kern/vnode_if.src.strat
+++ b/sys/kern/vnode_if.src
@@ -459,6 +459,14 @@
%! strategy debugpre vop_strategy_debugpre
vop_strategy {
+ IN struct vnode *vp;
+ IN struct buf *bp;
+};
+
+%% strategy_unlocked vp = = =
+%! strategy_unlocked debugpre vop_strategy_debugpre
+
+vop_strategy_unlocked {
IN struct vnode *vp;
IN struct buf *bp;
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 2, 1:54 AM (23 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42135718
Default Alt Text
D62249.1796176493.diff (1 KB)
Attached To
Mode
D62249: vnodeops: Add a new VOP_STRATEGY_UNLOCKED
Attached
Detach File
Event Timeline