From owner-p4-projects@FreeBSD.ORG Mon Jun 18 14:41:34 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EE9EC1065673; Mon, 18 Jun 2012 14:41:33 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98A4B106566B for ; Mon, 18 Jun 2012 14:41:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 7A09E8FC0C for ; Mon, 18 Jun 2012 14:41:33 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5IEfX4v024601 for ; Mon, 18 Jun 2012 14:41:33 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5IEfXxD024598 for perforce@freebsd.org; Mon, 18 Jun 2012 14:41:33 GMT (envelope-from jhb@freebsd.org) Date: Mon, 18 Jun 2012 14:41:33 GMT Message-Id: <201206181441.q5IEfXxD024598@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213070 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2012 14:41:34 -0000 http://p4web.freebsd.org/@@213070?ac=10 Change 213070 by jhb@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);