PERFORCE change 213070 for review
John Baldwin
jhb at FreeBSD.org
Mon Jun 18 14:41:34 UTC 2012
http://p4web.freebsd.org/@@213070?ac=10
Change 213070 by jhb at jhb_jhbbsd on 2012/06/18 14:40:33
Rename vdetachbuf() to vrelbuf().
Affected files ...
.. //depot/projects/fadvise/sys/kern/vfs_default.c#10 edit
.. //depot/projects/fadvise/sys/kern/vfs_subr.c#13 edit
.. //depot/projects/fadvise/sys/sys/vnode.h#9 edit
.. //depot/projects/fadvise/sys/ufs/ffs/ffs_vnops.c#11 edit
Differences ...
==== //depot/projects/fadvise/sys/kern/vfs_default.c#10 (text+ko) ====
@@ -1007,11 +1007,11 @@
break;
case POSIX_FADV_DONTNEED:
/*
- * Flush any open FS buffers and then remove pages
+ * Release any clean FS buffers and then remove pages
* from the backing VM object. Since the block size
- * is FS-specific knowledge, the vdetachbuf() here is
- * a bit heavy-handed as it flushes all buffers for
- * the given vnode, not just the buffers covering the
+ * is FS-specific knowledge, the vrelbuf() here is a
+ * bit heavy-handed as it flushes all buffers for the
+ * given vnode, not just the buffers covering the
* requested range.
*/
error = 0;
@@ -1022,7 +1022,7 @@
VFS_UNLOCK_GIANT(vfslocked);
break;
}
- vdetachbuf(vp, 0, 0, 0, 0);
+ vrelbuf(vp, 0, 0, 0, 0);
if (vp->v_object != NULL) {
start = trunc_page(ap->a_start);
end = round_page(ap->a_end);
==== //depot/projects/fadvise/sys/kern/vfs_subr.c#13 (text+ko) ====
@@ -1320,14 +1320,13 @@
}
/*
- * Detach clean buffers for a range of blocks in a file from it's
+ * Release clean buffers for a range of blocks in a file from it's
* backing pages. This does not invalidate the buffers like
* flushbuflist(). If the range is specified as (0, 0), then all
* clean buffers are detached.
*/
int
-vdetachbuf(struct vnode *vp, daddr_t start, daddr_t end, int slpflag,
- int slptimeo)
+vrelbuf(struct vnode *vp, daddr_t start, daddr_t end, int slpflag, int slptimeo)
{
struct bufobj *bo;
struct buf *bp, *nbp;
@@ -1351,7 +1350,7 @@
}
error = BUF_TIMELOCK(bp,
LK_EXCLUSIVE | LK_SLEEPFAIL | LK_INTERLOCK, BO_MTX(bo),
- "detachbuf", slpflag, slptimeo);
+ "relbuf", slpflag, slptimeo);
if (error == ENOLCK) {
BO_LOCK(bo);
goto restart;
==== //depot/projects/fadvise/sys/sys/vnode.h#9 (text+ko) ====
@@ -626,7 +626,7 @@
struct ucred *cred, int *privused);
void vattr_null(struct vattr *vap);
int vcount(struct vnode *vp);
-int vdetachbuf(struct vnode *vp, daddr_t start, daddr_t end, int slpflag,
+int vrelbuf(struct vnode *vp, daddr_t start, daddr_t end, int slpflag,
int slptimeo);
void vdrop(struct vnode *);
void vdropl(struct vnode *);
==== //depot/projects/fadvise/sys/ufs/ffs/ffs_vnops.c#11 (text+ko) ====
@@ -471,7 +471,7 @@
VOP_UNLOCK(vp, 0);
return (0);
}
- vdetachbuf(vp, lblkno(fs, start), lblkno(fs, end), 0, 0);
+ vrelbuf(vp, lblkno(fs, start), lblkno(fs, end), 0, 0);
if (vp->v_object != NULL) {
start = trunc_page(start);
end = round_page(end);
More information about the p4-projects
mailing list